Class: Decidim::Blogs::Admin::ApplicationController
- Inherits:
-
Admin::Components::BaseController
- Object
- Admin::Components::BaseController
- Decidim::Blogs::Admin::ApplicationController
- Defined in:
- app/controllers/decidim/blogs/admin/application_controller.rb
Overview
Base controller for the administration of this module. It inherits from Decidim’s admin base controller in order to inherit the layout and other convenience methods relevant to a this component.
Direct Known Subclasses
AttachmentCollectionsController, AttachmentsController, PostsController
Instance Method Summary collapse
Instance Method Details
#post ⇒ Object
16 17 18 |
# File 'app/controllers/decidim/blogs/admin/application_controller.rb', line 16 def post @post ||= posts.find(params[:id]) end |
#posts ⇒ Object
12 13 14 |
# File 'app/controllers/decidim/blogs/admin/application_controller.rb', line 12 def posts @posts ||= Post.where(component: current_component).page(params[:page]).per(15) end |