fix revision count and drop observers

This commit is contained in:
shlok007 2017-01-04 22:27:46 -05:00 committed by Shlok Srivastava
parent 518ecc3d4e
commit b33e9ed28e
12 changed files with 69 additions and 34 deletions

View file

@ -1,5 +1,6 @@
class Event < ActiveRecord::Base
include ActiveRecord::Transitions
include RevisionCount
has_paper_trail on: [:create, :update], ignore: [:updated_at, :guid, :week], meta: { conference_id: :conference_id }
acts_as_commentable
@ -251,6 +252,10 @@ class Event < ActiveRecord::Base
event_schedules.find_by(schedule_id: program.selected_schedule_id).try(:start_time)
end
def conference
program.conference
end
private
##