Class: Decidim::Admin::CreateImportExample
- Inherits:
-
Command
- Object
- Command
- Decidim::Admin::CreateImportExample
- Defined in:
- app/commands/decidim/admin/create_import_example.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(form) ⇒ CreateImportExample
constructor
A new instance of CreateImportExample.
Constructor Details
#initialize(form) ⇒ CreateImportExample
Returns a new instance of CreateImportExample.
6 7 8 |
# File 'app/commands/decidim/admin/create_import_example.rb', line 6 def initialize(form) @form = form end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 |
# File 'app/commands/decidim/admin/create_import_example.rb', line 10 def call return broadcast(:invalid) if form.invalid? broadcast(:ok, form.example) end |