diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/tags_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 7115d28..cf5d50b 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb | |||
@@ -1,5 +1,10 @@ | |||
1 | class TagsController < ApplicationController | 1 | class TagsController < ApplicationController |
2 | 2 | ||
3 | def show | ||
4 | @blogs = Blog.tagged_with(params[:name]).where(published: true).order(published_at: :desc).paginate(page: params[:page], per_page: 10) | ||
5 | render "blogs/summary" | ||
6 | end | ||
7 | |||
3 | def suggest | 8 | def suggest |
4 | @tags = ActsAsTaggableOn::Tag.pluck(:name).select do |tag| | 9 | @tags = ActsAsTaggableOn::Tag.pluck(:name).select do |tag| |
5 | tag.starts_with? params[:term] | 10 | tag.starts_with? params[:term] |