Class: Decidim::Amendable::Form

Inherits:
Form
  • Object
show all
Defined in:
app/forms/decidim/amendable/form.rb

Overview

a form object common for amendments

Instance Method Summary collapse

Instance Method Details

#amendableObject



13
14
15
# File 'app/forms/decidim/amendable/form.rb', line 13

def amendable
  @amendable ||= amendment&.amendable
end

#amenderObject



21
22
23
# File 'app/forms/decidim/amendable/form.rb', line 21

def amender
  @amender ||= amendment&.amender
end

#amendmentObject



9
10
11
# File 'app/forms/decidim/amendable/form.rb', line 9

def amendment
  @amendment ||= Decidim::Amendment.find_by(id: id)
end

#emendationObject



17
18
19
# File 'app/forms/decidim/amendable/form.rb', line 17

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