keynote type available only to admins. Able to mark as highlight. Highlights and Keynotes scoped.

This commit is contained in:
Stella Rouzi 2014-11-28 14:47:39 +02:00
parent 6a62e9f8b9
commit 8ac11821fa
3 changed files with 4 additions and 16 deletions

View file

@ -566,18 +566,6 @@ class Conference < ActiveRecord::Base
email_settings.updated_conference_registration_dates_template
end
def keynotes
events.where(state: 'confirmed').select { |e| e.event_type.title == 'Keynote'}
end
##
#
# ====Returns
# * +Array+ -> Events with attribute 'is_highlight'
def highlights
events.where(is_highlight: true)
end
private
after_create do