star voting system for proposals

This commit is contained in:
differentreality 2013-08-16 12:46:49 +03:00
parent 2314d943e1
commit 834362491e
17 changed files with 157 additions and 3 deletions

View file

@ -8,6 +8,8 @@ class Person < ActiveRecord::Base
has_many :event_people, :dependent => :destroy
has_many :events, :through => :event_people, :uniq => true
has_many :registrations, :dependent => :destroy
has_many :votes, :dependent => :destroy
has_many :voted_events, :through => :votes, :source => :events
validates :first_name, :presence => true
validates :last_name, :presence => true