about summary refs log tree commit diff stats
path: root/app/controllers
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-10-13 11:51:47 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-10-13 11:51:47 -0400
commit0333f3e258026696af265f777f862e612bab1bd7 (patch)
treef1ed811b0c327d9561d4fda299345b5526591a69 /app/controllers
parent843f3515e5619120ca2c65954a011845225a31f1 (diff)
downloadthoughts-0333f3e258026696af265f777f862e612bab1bd7.tar.gz
thoughts-0333f3e258026696af265f777f862e612bab1bd7.tar.bz2
thoughts-0333f3e258026696af265f777f862e612bab1bd7.zip
Tag links
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/tags_controller.rb5
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 @@
1class TagsController < ApplicationController 1class 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]