2013-08-16 12:46:49 +03:00
|
|
|
class Vote < ActiveRecord::Base
|
2014-06-23 19:07:50 +03:00
|
|
|
belongs_to :user
|
2013-08-16 12:46:49 +03:00
|
|
|
belongs_to :event
|
2016-05-24 23:54:46 +05:30
|
|
|
|
|
|
|
|
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }
|
|
|
|
|
|
2014-06-24 12:14:53 +03:00
|
|
|
delegate :name, to: :user
|
2016-05-24 23:54:46 +05:30
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
def conference_id
|
|
|
|
|
event.program.conference_id
|
|
|
|
|
end
|
2014-06-23 19:07:50 +03:00
|
|
|
end
|