Sha256: 56f71aeaee10d7d9bbaa905078ed40109cd756172ec02ef66c4af77bf1f2e182

Contents?: true

Size: 407 Bytes

Versions: 5

Compression:

Stored size: 407 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Amendable
    # a form object common for amendments
    class Form < Decidim::Form
      mimic :amend

      def amendment
        @amendment ||= Decidim::Amendment.find id
      end

      def amendable
        @amendable ||= amendment.amendable
      end

      def emendation
        @emendation ||= amendment.emendation
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
decidim-core-0.17.2 app/forms/decidim/amendable/form.rb
decidim-core-0.17.1 app/forms/decidim/amendable/form.rb
decidim-core-0.16.1 app/forms/decidim/amendable/form.rb
decidim-core-0.17.0 app/forms/decidim/amendable/form.rb
decidim-core-0.16.0 app/forms/decidim/amendable/form.rb