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
15 16 17 18 19 20 21 22 |
# File 'app/controllers/decidim/sortitions/sortitions_controller.rb', line 15 def index @sortitions = search .result .includes(:category) @sortitions = reorder(@sortitions) @sortitions = paginate(@sortitions) end |
#show ⇒ Object
24 25 26 |
# File 'app/controllers/decidim/sortitions/sortitions_controller.rb', line 24 def show raise ActionController::RoutingError, "Not Found" unless sortition end |