Class: CandidateVote
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- CandidateVote
- Defined in:
- app/models/candidate_vote.rb
Instance Method Summary collapse
Instance Method Details
#name ⇒ Object
5 6 7 |
# File 'app/models/candidate_vote.rb', line 5 def name candidate && candidate.name end |
#tampered?(office) ⇒ Boolean
13 14 15 |
# File 'app/models/candidate_vote.rb', line 13 def tampered?(office) !candidate || candidate.office != office end |
#vote ⇒ Object
9 10 11 |
# File 'app/models/candidate_vote.rb', line 9 def vote self.voted = true end |