diff options
| author | hukl <contact@smyck.org> | 2009-09-05 18:08:23 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-09-05 18:08:23 +0200 |
| commit | f919497c2b590402c3cbd7744097a9bd32b70afd (patch) | |
| tree | 94961500f507a7cceec67868fe042755d94151d8 /app/controllers | |
| parent | 3c631738935199aba050223bac50416b299e16c5 (diff) | |
added tag resource, widget and auxillary files
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/tags_controller.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb new file mode 100644 index 0000000..9248402 --- /dev/null +++ b/app/controllers/tags_controller.rb | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | class TagsController < ApplicationController | ||
| 2 | def index | ||
| 3 | end | ||
| 4 | |||
| 5 | def show | ||
| 6 | @tag = Tag.find_by_name(params[:id]) | ||
| 7 | @page = Page.new | ||
| 8 | @pages = Page.heads.find_tagged_with( | ||
| 9 | @tag.name, :order => 'published_at DESC' | ||
| 10 | ).paginate( | ||
| 11 | :page=>params[:page], | ||
| 12 | :per_page => 23 | ||
| 13 | ) | ||
| 14 | end | ||
| 15 | |||
| 16 | end | ||
