Class: Decidim::Sortitions::Admin::ApplicationController
- Inherits:
-
Admin::Components::BaseController
- Object
- Admin::Components::BaseController
- Decidim::Sortitions::Admin::ApplicationController
- Defined in:
- app/controllers/decidim/sortitions/admin/application_controller.rb
Overview
This controller is the abstract class from which all other controllers of this engine inherit.
Note that it inherits from ‘Decidim::Components::BaseController`, which override its layout and provide all kinds of useful methods.
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#sortition ⇒ Object
22 23 24 |
# File 'app/controllers/decidim/sortitions/admin/application_controller.rb', line 22 def sortition @sortition ||= sortitions.find(params[:id]) end |
#sortitions ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/controllers/decidim/sortitions/admin/application_controller.rb', line 14 def sortitions @sortitions ||= Decidim::Sortitions::FilteredSortitions .for(current_component) .order(created_at: :desc) .page(params[:page]) .per(Decidim::Sortitions.items_per_page) end |