Class: Decidim::Sortitions::SortitionsController
- Inherits:
-
ApplicationController
- Object
- Components::BaseController
- ApplicationController
- Decidim::Sortitions::SortitionsController
- Includes:
- Orderable, FilterResource, Paginable
- Defined in:
- app/controllers/decidim/sortitions/sortitions_controller.rb
Overview
Exposes the sortition resource so users can view them
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/decidim/sortitions/sortitions_controller.rb', line 16 def index @sortitions = search .results .includes(:author) .includes(:category) @sortitions = paginate(@sortitions) @sortitions = reorder(@sortitions) end |