Class: Neutral::Vote
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Neutral::Vote
show all
- Includes:
- Model::VoteCached
- Defined in:
- app/models/neutral/vote.rb
Instance Method Summary
collapse
#add_vote_to_voting, #edit_vote_within_voting, #remove_vote_from_voting
Instance Method Details
#main_attributes ⇒ Object
17
18
19
|
# File 'app/models/neutral/vote.rb', line 17
def main_attributes
attributes.symbolize_keys.except(:id, :voter_id, :created_at, :updated_at)
end
|
#nature ⇒ Object
13
14
15
|
# File 'app/models/neutral/vote.rb', line 13
def nature
value == 1 ? :positive : :negative
end
|