Class: Integral::TagsController
- Inherits:
-
BlogController
- Object
- BlogController
- Integral::TagsController
- Defined in:
- app/controllers/integral/tags_controller.rb
Overview
Front end tags controller
Instance Method Summary collapse
-
#index ⇒ Object
GET / List blog tags.
-
#show ⇒ Object
GET /:id Presents blog tags.
Instance Method Details
#index ⇒ Object
GET / List blog tags
10 11 12 13 |
# File 'app/controllers/integral/tags_controller.rb', line 10 def index t('integral.breadcrumbs.tags'), nil @tags = Integral::Post.tag_counts_on("published_#{I18n.locale}", order: 'taggings_count desc').paginate(page: params[:page]) end |
#show ⇒ Object
GET /:id Presents blog tags
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/controllers/integral/tags_controller.rb', line 17 def show t('integral.breadcrumbs.tags'), integral. @resource.name, nil page_title = "Posts tagged with #{@resource.name}" page_title += " - Page #{params[:page]}" if params[:page].present? page_description = params[:page].present? ? "Page #{params[:page] } - #{t('integral.tags.show.description', tag_name: @resource.name)}" : t('integral.tags.show.description', tag_name: @resource.name) @meta_data = { page_title: page_title, page_description: page_description } end |