Sha256: b5aefccb28c5dc96b85b62bfc760f61e6ba3c7becb0173edf164d2d9489e50f0
Contents?: true
Size: 573 Bytes
Versions: 64
Compression:
Stored size: 573 Bytes
Contents
# frozen_string_literal: true module Decidim module Amendable # A form object used to edit emendations class EditForm < Decidim::Amendable::Form mimic :amendment attribute :id, Integer attribute :user_group_id, Integer attribute :emendation_params, Hash validates :id, presence: true validate :emendation_must_change_amendable validate :amendable_form_must_be_valid def map_model(model) self.emendation_params = model.emendation.attributes.slice(*amendable_fields_as_string) end end end end
Version data entries
64 entries across 64 versions & 1 rubygems