Class: Decidim::Sortitions::SortitionsController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- Components::BaseController
- ApplicationController
- Decidim::Sortitions::SortitionsController
- Includes:
- FilterResource, Paginable, Orderable
- Defined in:
- decidim-sortitions/app/controllers/decidim/sortitions/sortitions_controller.rb
Overview
Exposes the sortition resource so users can view them
Constant Summary
Constants included from Paginable
Instance Method Summary collapse
Methods inherited from Components::BaseController
#current_component, #current_manifest, #current_participatory_space, #permission_class_chain, #permission_scope, #redirect_unless_feature_private, #set_component_breadcrumb_item, #share_token
Methods included from RegistersPermissions
Methods included from UserBlockedChecker
#check_user_block_status, #check_user_not_blocked
Methods included from NeedsSnippets
Methods included from Headers::HttpCachingDisabler
Methods included from HasStoredPath
#skip_store_location?, #store_current_location
Methods included from NeedsOrganization
enhance_controller, extended, included
Instance Method Details
#index ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'decidim-sortitions/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 'decidim-sortitions/app/controllers/decidim/sortitions/sortitions_controller.rb', line 24 def show raise ActionController::RoutingError, "Not Found" unless sortition end |