Revert "add is_keynote attribute to event_types"

This reverts commit 96253b1fe048e2052fc35e961c5afbf27d0ef740.

Conflicts:
	app/models/conference.rb
This commit is contained in:
Stella Rouzi 2014-12-08 16:11:38 +02:00
parent c787190571
commit c9615f1880
9 changed files with 11 additions and 25 deletions

View file

@ -45,13 +45,11 @@ class Conference < ActiveRecord::Base
end
def keynotes
where(state: :confirmed).
select { |e| e.event_type.is_keynote == true}
where(state: :confirmed).select { |e| e.event_type.title == 'Keynote'}
end
def highlights
where(state: :confirmed).where(is_highlight: true).
select { |e| e.event_type.is_keynote != true} # No duplication, if event is a keynote
where(is_highlight: true)
end
end
has_many :event_users, through: :events

View file

@ -1,6 +1,6 @@
class EventType < ActiveRecord::Base
attr_accessible :title, :length, :minimum_abstract_length, :maximum_abstract_length, :color,
:conference_id, :is_keynote
:conference_id
belongs_to :conference