Created
July 16, 2013 20:21
-
-
Save mwlang/6012302 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| has_and_belongs_to_many :normal_events, | |
| :join_table => 'events_practices', | |
| :conditions => "type = 'NormalEvent' AND status_id = #{Status[:published].id}", | |
| :association_foreign_key => "event_id", | |
| :order => 'starts_on ASC' | |
| has_and_belongs_to_many :normal_events_future, | |
| :class_name => 'NormalEvent', | |
| :join_table => 'events_practices', | |
| :conditions => "type = 'NormalEvent' AND status_id = #{Status[:published].id} AND starts_on >= '#{0.days.ago.to_s(:db)}'", | |
| :association_foreign_key => "event_id", | |
| :order => 'starts_on ASC' | |
| has_and_belongs_to_many :normal_events_past, | |
| :class_name => 'NormalEvent', | |
| :join_table => 'events_practices', | |
| :conditions => "type = 'NormalEvent' AND status_id = #{Status[:published].id} AND starts_on < '#{0.days.ago.to_s(:db)}'", | |
| :association_foreign_key => "event_id", | |
| :order => 'starts_on DESC' | |
| has_and_belongs_to_many :campus_interviews, | |
| :join_table => 'events_practices', | |
| :conditions => "type = 'CampusInterview' AND status_id = #{Status[:published].id}", | |
| :association_foreign_key => "event_id", | |
| :order => 'starts_on ASC' | |
| has_and_belongs_to_many :campus_interviews_future, | |
| :class_name => 'CampusInterview', | |
| :join_table => 'events_practices', | |
| :conditions => "type = 'CampusInterview' AND status_id = #{Status[:published].id} AND starts_on >= '#{0.days.ago.to_s(:db)}'", | |
| :association_foreign_key => "event_id" , | |
| :order => 'starts_on ASC' | |
| has_and_belongs_to_many :campus_interviews_past, | |
| :class_name => 'CampusInterview', | |
| :join_table => 'events_practices', | |
| :conditions => "type = 'CampusInterview' AND status_id = #{Status[:published].id} AND starts_on < '#{0.days.ago.to_s(:db)}'", | |
| :association_foreign_key => "event_id" , | |
| :order => 'starts_on DESC' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment