diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/tags_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index bceb3cf..355706b 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb | |||
@@ -1,5 +1,9 @@ | |||
1 | class TagsController < ApplicationController | 1 | class TagsController < ApplicationController |
2 | 2 | ||
3 | def index | ||
4 | @tags = Blog.tag_counts | ||
5 | end | ||
6 | |||
3 | def show | 7 | def show |
4 | @tag_name = params[:name] | 8 | @tag_name = params[:name] |
5 | @blogs = Blog.tagged_with(params[:name]).where(published: true).order(published_at: :desc).paginate(page: params[:page], per_page: 10) | 9 | @blogs = Blog.tagged_with(params[:name]).where(published: true).order(published_at: :desc).paginate(page: params[:page], per_page: 10) |