Class: Decidim::Blogs::Admin::ApplicationController
- Inherits:
-
Admin::Components::BaseController
- Object
- DecidimController
- Admin::ApplicationController
- Admin::Components::BaseController
- Decidim::Blogs::Admin::ApplicationController
- Defined in:
- decidim-blogs/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
Methods inherited from Admin::Components::BaseController
#current_component, #current_participatory_space, #parent_path, #permission_class_chain, #permission_scope, #permissions_context, #set_component_breadcrumb_item, #skip_manage_component_permission
Methods included from RegistersPermissions
Methods inherited from Admin::ApplicationController
#permission_class_chain, #permission_scope, #user_has_no_permission_path, #user_not_authorized_path
Methods included from Headers::HttpCachingDisabler
Methods included from NeedsSnippets
Methods included from NeedsOrganization
enhance_controller, extended, included
Instance Method Details
#post ⇒ Object
16 17 18 |
# File 'decidim-blogs/app/controllers/decidim/blogs/admin/application_controller.rb', line 16 def post @post ||= posts.find(params[:id]) end |
#posts ⇒ Object
12 13 14 |
# File 'decidim-blogs/app/controllers/decidim/blogs/admin/application_controller.rb', line 12 def posts @posts ||= Post.where(component: current_component).page(params[:page]).per(15) end |