Class: Decidim::DirectVerifications::Verification::CreateImportForm
- Inherits:
-
Form
- Object
- Form
- Decidim::DirectVerifications::Verification::CreateImportForm
- Defined in:
- app/forms/decidim/direct_verifications/verification/create_import_form.rb
Constant Summary collapse
- ACTIONS =
{ "in" => :authorize, "out" => :revoke, "check" => :check }.freeze
Instance Method Summary collapse
Instance Method Details
#action ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'app/forms/decidim/direct_verifications/verification/create_import_form.rb', line 31 def action if register && == "in" :register_and_authorize elsif register :register else ACTIONS[] end end |
#available_authorization_handler ⇒ Object
25 26 27 28 29 |
# File 'app/forms/decidim/direct_verifications/verification/create_import_form.rb', line 25 def return if .in?(organization.) errors.add(:authorization_handler, :inclusion) end |