From f919497c2b590402c3cbd7744097a9bd32b70afd Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 5 Sep 2009 18:08:23 +0200 Subject: added tag resource, widget and auxillary files --- app/controllers/tags_controller.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 app/controllers/tags_controller.rb (limited to 'app/controllers') 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 @@ +class TagsController < ApplicationController + def index + end + + def show + @tag = Tag.find_by_name(params[:id]) + @page = Page.new + @pages = Page.heads.find_tagged_with( + @tag.name, :order => 'published_at DESC' + ).paginate( + :page=>params[:page], + :per_page => 23 + ) + end + +end -- cgit v1.3