Class: Decidim::ActionDelegator::Admin::ParticipantForm
- Inherits:
-
Form
- Object
- Form
- Decidim::ActionDelegator::Admin::ParticipantForm
- Defined in:
- app/forms/decidim/action_delegator/admin/participant_form.rb
Instance Method Summary collapse
- #authorization_method ⇒ Object
-
#phone ⇒ Object
When there’s a phone number, sanitize it allowing only numbers and +.
- #setting ⇒ Object
Instance Method Details
#authorization_method ⇒ Object
29 30 31 |
# File 'app/forms/decidim/action_delegator/admin/participant_form.rb', line 29 def @authorization_method ||= setting&. end |
#phone ⇒ Object
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 |
#setting ⇒ Object
25 26 27 |
# File 'app/forms/decidim/action_delegator/admin/participant_form.rb', line 25 def setting @setting ||= context[:setting] end |