Class: Integral::CategoriesController
- Inherits:
-
BlogController
- Object
- BlogController
- Integral::CategoriesController
- Defined in:
- app/controllers/integral/categories_controller.rb
Overview
Front end categories controller
Instance Method Summary collapse
-
#show ⇒ Object
GET /:id Presents all posts with particular category.
Instance Method Details
#show ⇒ Object
GET /:id Presents all posts with particular category
8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/integral/categories_controller.rb', line 8 def show @resource.title, nil @meta_data = { page_title: @resource.title, page_description: @resource.description, image: @resource&.image&.url } @posts = Integral::Post.published.where(category_id: @resource.id).paginate(page: params[:page]) end |