Class: Decidim::DecidimAwesome::PaperTrailBasePresenter
- Inherits:
-
Object
- Object
- Decidim::DecidimAwesome::PaperTrailBasePresenter
- Defined in:
- app/presenters/decidim/decidim_awesome/paper_trail_base_presenter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
-
#html ⇒ Object
readonly
Returns the value of attribute html.
Instance Method Summary collapse
-
#initialize(entry, html: true) ⇒ PaperTrailBasePresenter
constructor
A new instance of PaperTrailBasePresenter.
-
#item ⇒ Object
try to use the object in the database if exists Note that “reify” does not work on “create” events.
- #item_id ⇒ Object
- #item_type ⇒ Object
Constructor Details
#initialize(entry, html: true) ⇒ PaperTrailBasePresenter
Returns a new instance of PaperTrailBasePresenter.
8 9 10 11 |
# File 'app/presenters/decidim/decidim_awesome/paper_trail_base_presenter.rb', line 8 def initialize(entry, html: true) @entry = entry @html = html end |
Instance Attribute Details
#entry ⇒ Object (readonly)
Returns the value of attribute entry.
6 7 8 |
# File 'app/presenters/decidim/decidim_awesome/paper_trail_base_presenter.rb', line 6 def entry @entry end |
#html ⇒ Object (readonly)
Returns the value of attribute html.
6 7 8 |
# File 'app/presenters/decidim/decidim_awesome/paper_trail_base_presenter.rb', line 6 def html @html end |
Instance Method Details
#item ⇒ Object
try to use the object in the database if exists Note that “reify” does not work on “create” events
15 16 17 |
# File 'app/presenters/decidim/decidim_awesome/paper_trail_base_presenter.rb', line 15 def item @item ||= entry&.item end |
#item_id ⇒ Object
23 24 25 |
# File 'app/presenters/decidim/decidim_awesome/paper_trail_base_presenter.rb', line 23 def item_id @item_id ||= entry&.item_id end |
#item_type ⇒ Object
19 20 21 |
# File 'app/presenters/decidim/decidim_awesome/paper_trail_base_presenter.rb', line 19 def item_type @item_type ||= entry&.item_type end |