Class: Decidim::Admin::TaxonomyFiltersSelectorController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- Decidim::Admin::TaxonomyFiltersSelectorController
- Defined in:
- app/controllers/decidim/admin/taxonomy_filters_selector_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
Updates the component with the selected taxonomy filter.
-
#destroy ⇒ Object
Removes the selected taxonomy filter from the component.
-
#index ⇒ Object
Renders “choose the taxonomy” step.
-
#new ⇒ Object
Renders “choose the taxonomy filter” step.
-
#show ⇒ Object
Renders the component with the selected taxonomy filter.
Methods inherited from ApplicationController
#permission_class_chain, #permission_scope, #user_has_no_permission_path, #user_not_authorized_path
Instance Method Details
#create ⇒ Object
Updates the component with the selected taxonomy filter
34 35 36 37 38 39 40 |
# File 'app/controllers/decidim/admin/taxonomy_filters_selector_controller.rb', line 34 def create :create, :taxonomy_filter update_filters!(component.settings.taxonomy_filters + [taxonomy_filter.id.to_s]) render partial: "decidim/admin/taxonomy_filters_selector/component_table" end |
#destroy ⇒ Object
Removes the selected taxonomy filter from the component
48 49 50 51 52 53 54 |
# File 'app/controllers/decidim/admin/taxonomy_filters_selector_controller.rb', line 48 def destroy :destroy, :taxonomy_filter update_filters!(component.settings.taxonomy_filters - [taxonomy_filter.id.to_s]) if taxonomy_filter render partial: "decidim/admin/taxonomy_filters_selector/component_table" end |
#index ⇒ Object
Renders “choose the taxonomy” step
24 25 26 |
# File 'app/controllers/decidim/admin/taxonomy_filters_selector_controller.rb', line 24 def index :index, :taxonomy_filter end |
#new ⇒ Object
Renders “choose the taxonomy filter” step
29 30 31 |
# File 'app/controllers/decidim/admin/taxonomy_filters_selector_controller.rb', line 29 def new :create, :taxonomy_filter end |
#show ⇒ Object
Renders the component with the selected taxonomy filter
43 44 45 |
# File 'app/controllers/decidim/admin/taxonomy_filters_selector_controller.rb', line 43 def show :show, :taxonomy_filter end |