Module: Neutral::Model::VoteCached

Extended by:
ActiveSupport::Concern
Included in:
Vote
Defined in:
lib/neutral/model/vote_cached.rb

Instance Method Summary collapse

Instance Method Details

#add_vote_to_votingObject



14
15
16
17
18
19
20
21
# File 'lib/neutral/model/vote_cached.rb', line 14

def add_vote_to_voting
  if voting
    voting.add_to_existing(nature)
  else
    Voting.init(self)
    clear_association_cache
  end
end

#edit_vote_within_votingObject



23
24
25
# File 'lib/neutral/model/vote_cached.rb', line 23

def edit_vote_within_voting
  voting.edit nature
end

#remove_vote_from_votingObject



27
28
29
# File 'lib/neutral/model/vote_cached.rb', line 27

def remove_vote_from_voting
  voting.remove nature
end