Class: Decidim::Initiatives::CreateInitiativeController

Inherits:
ApplicationController show all
Includes:
FormFactory, InitiativeHelper, SingleInitiativeType, TypeSelectorOptions, Wicked::Wizard
Defined in:
decidim-initiatives/app/controllers/decidim/initiatives/create_initiative_controller.rb

Overview

Controller in charge of managing the create initiative wizard.

Instance Method Summary collapse

Methods included from TranslationsHelper

empty_translatable, ensure_translatable, multi_translation, translated_in_current_locale?

Methods included from TranslatableAttributes

#default_locale?

Methods included from InitiativeHelper

#authorized_vote_modal_button, #can_edit_area?, #can_edit_custom_signature_end_date?, #humanize_admin_state, #humanize_state, #popularity_class, #popularity_level1?, #popularity_level2?, #popularity_level3?, #popularity_level4?, #popularity_level5?, #popularity_tag, #state_badge_css_class

Methods included from ResourceVersionsHelper

#link_to_other_resource_versions, #resource_version, #resource_version_number, #resource_version_of

Methods included from ResourceHelper

#linked_classes_filter_values_for, #linked_classes_for, #linked_resources_for, #resource_locator, #resource_title

Methods included from SanitizeHelper

#decidim_html_escape, #decidim_sanitize, #decidim_sanitize_newsletter, #decidim_url_escape, included

Methods inherited from ApplicationController

#permission_class_chain, #permission_scope, #permissions_context

Methods included from RegistersPermissions

register_permissions

Methods included from UserBlockedChecker

#check_user_block_status, #check_user_not_blocked

Methods included from NeedsSnippets

#snippets

Methods included from HttpCachingDisabler

#disable_http_caching

Methods included from HasStoredPath

#skip_store_location?, #store_current_location

Methods included from NeedsOrganization

enhance_controller, extended, included

Instance Method Details

#showObject


33
34
35
36
# File 'decidim-initiatives/app/controllers/decidim/initiatives/create_initiative_controller.rb', line 33

def show
  enforce_permission_to :create, :initiative
  send("#{step}_step", initiative: session_initiative)
end

#updateObject


38
39
40
41
# File 'decidim-initiatives/app/controllers/decidim/initiatives/create_initiative_controller.rb', line 38

def update
  enforce_permission_to :create, :initiative
  send("#{step}_step", params)
end