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,4 +1,5 @@
class Conference < ActiveRecord::Base
include RevisionCount
require 'uri'
serialize :events_per_week, Hash
# Needed to call 'Conference.with_role' in /models/ability.rb
@ -734,6 +735,15 @@ class Conference < ActiveRecord::Base
(start_hour..(end_hour - 1)).cover?(current_hour) ? current_hour - start_hour : 0
end
##
# Return the current conference object to be used in RevisionCount
#
# ====Returns
# * +ActiveRecord+
def conference
self
end
private
# Returns a different html colour for every i and consecutive colors are