Class: Decidim::Templates::Admin::CopyProposalAnswerTemplate
- Inherits:
-
CopyTemplate
- Object
- Command
- CopyTemplate
- Decidim::Templates::Admin::CopyProposalAnswerTemplate
- Defined in:
- app/commands/decidim/templates/admin/copy_proposal_answer_template.rb
Instance Method Summary collapse
Methods inherited from CopyTemplate
Constructor Details
This class inherits a constructor from Decidim::Templates::Admin::CopyTemplate
Instance Method Details
#copy_template ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'app/commands/decidim/templates/admin/copy_proposal_answer_template.rb', line 8 def copy_template @copied_template = Template.create!( organization: @template.organization, name: @template.name, description: @template.description, target: :proposal_answer, field_values: @template.field_values, templatable: @template.templatable ) end |