Class: Decidim::ScopesController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- Decidim::ScopesController
- Defined in:
- app/controllers/decidim/scopes_controller.rb
Overview
Exposes the scopes text search so users can choose a scope writing its name.
Instance Method Summary collapse
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 TranslatableAttributes
Methods included from RegistersPermissions
Methods included from NeedsOrganization
enhance_controller, extended, included
Instance Method Details
#picker ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'app/controllers/decidim/scopes_controller.rb', line 8 def picker :pick, :scope context = picker_context(root, title, max_depth) required = params&.[](:required) != "false" scopes, parent_scopes = resolve_picker_scopes(root, current) render( :picker, layout: nil, locals: { required:, title:, root:, current: (current || root), scopes: scopes&.order(name: :asc), parent_scopes:, picker_target_id: (params[:target_element_id] || "content"), global_value: params[:global_value], max_depth:, context: } ) end |