Class: Decidim::ActionDelegator::WhodunnitVote
- Inherits:
-
Consultations::Vote
- Object
- Consultations::Vote
- Decidim::ActionDelegator::WhodunnitVote
- Defined in:
- app/models/decidim/action_delegator/whodunnit_vote.rb
Instance Method Summary collapse
-
#initialize(vote, user) ⇒ WhodunnitVote
constructor
A new instance of WhodunnitVote.
- #save ⇒ Object
- #save! ⇒ Object
Constructor Details
#initialize(vote, user) ⇒ WhodunnitVote
Returns a new instance of WhodunnitVote.
6 7 8 9 |
# File 'app/models/decidim/action_delegator/whodunnit_vote.rb', line 6 def initialize(vote, user) @user = user super(vote) end |
Instance Method Details
#save ⇒ Object
11 12 13 14 15 |
# File 'app/models/decidim/action_delegator/whodunnit_vote.rb', line 11 def save PaperTrail.request(whodunnit: user.id) do super end end |
#save! ⇒ Object
17 18 19 20 21 |
# File 'app/models/decidim/action_delegator/whodunnit_vote.rb', line 17 def save! PaperTrail.request(whodunnit: user.id) do super end end |