| Class | TagsController |
| In: |
app/controllers/tags_controller.rb
|
| Parent: | ApplicationController |
Unique tags sorted by name
# File app/controllers/tags_controller.rb, line 9
9: def index
10: @tagnames = Tag.ascend_by_name.map { |t| t.name }.uniq
11: end
list all tagables of this tag
# File app/controllers/tags_controller.rb, line 14
14: def show
15: @tagname = params[:id].to_s
16: @tags = Tag.name_is(@tagname).descend_by_updated_at.reject {|r| !r.tagable.read_allowed?(current_user) }.paginate(
17: :page => params[:page], :per_page => POSTINGS_PER_PAGE)
18: @tagables = @tags.map { |t|
19: t.tagable
20: }.sort { |b,a| a.updated_at <=> b.updated_at }
21: end