Class: Decidim::ActionDelegator::Admin::ParticipantForm

Inherits:
Form
  • Object
show all
Defined in:
app/forms/decidim/action_delegator/admin/participant_form.rb

Instance Method Summary collapse

Instance Method Details

#authorization_methodObject



29
30
31
# File 'app/forms/decidim/action_delegator/admin/participant_form.rb', line 29

def authorization_method
  @authorization_method ||= setting&.authorization_method
end

#phoneObject

When there’s a phone number, sanitize it allowing only numbers and +.



19
20
21
22
23
# File 'app/forms/decidim/action_delegator/admin/participant_form.rb', line 19

def phone
  return unless super

  super.gsub(/[^+0-9]/, "")
end

#settingObject



25
26
27
# File 'app/forms/decidim/action_delegator/admin/participant_form.rb', line 25

def setting
  @setting ||= context[:setting]
end