Skip to content

Instantly share code, notes, and snippets.

@adrianpike
Created January 20, 2011 02:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrianpike/787274 to your computer and use it in GitHub Desktop.
Save adrianpike/787274 to your computer and use it in GitHub Desktop.
ruby-1.9.2-p0 > Event::Archive.reflect_on_all_associations
=> []
ruby-1.9.2-p0 > Event.reflect_on_all_associations
=> [#<ActiveRecord::Reflection::AssociationReflection:0x0000010329a0f0 @macro=:belongs_to, @name=:asset, @options={}, @active_record=Event(id: integer, type: string, asset_id: integer, user_id: integer, title: string, description: text, start: datetime, stop: datetime, reoccurrence_id: integer, exclusive: boolean, organizer_notes: text, guest_notes: text, location: string, created_at: datetime, updated_at: datetime, schedule_type: text, completed_at: datetime), @collection=false>, #<ActiveRecord::Reflection::AssociationReflection:0x0000010306c210 @macro=:belongs_to, @name=:user, @options={}, @active_record=Event(id: integer, type: string, asset_id: integer, user_id: integer, title: string, description: text, start: datetime, stop: datetime, reoccurrence_id: integer, exclusive: boolean, organizer_notes: text, guest_notes: text, location: string, created_at: datetime, updated_at: datetime, schedule_type: text, completed_at: datetime), @collection=false>, #<ActiveRecord::Reflection::AssociationReflection:0x0000010302aab8 @macro=:has_many, @name=:invitations, @options={:dependent=>:destroy, :extend=>[]}, @active_record=Event(id: integer, type: string, asset_id: integer, user_id: integer, title: string, description: text, start: datetime, stop: datetime, reoccurrence_id: integer, exclusive: boolean, organizer_notes: text, guest_notes: text, location: string, created_at: datetime, updated_at: datetime, schedule_type: text, completed_at: datetime), @collection=true, @class_name="Invitation", @klass=Invitation(id: integer, user_id: integer, event_id: integer, attendance_status: integer, created_at: datetime, updated_at: datetime, inviter_id: integer), @quoted_table_name="\"invitations\"", @primary_key_name="event_id">, #<ActiveRecord::Reflection::ThroughReflection:0x000001017cdd80 @macro=:has_many, @name=:users, @options={:through=>:invitations, :extend=>[]}, @active_record=Event(id: integer, type: string, asset_id: integer, user_id: integer, title: string, description: text, start: datetime, stop: datetime, reoccurrence_id: integer, exclusive: boolean, organizer_notes: text, guest_notes: text, location: string, created_at: datetime, updated_at: datetime, schedule_type: text, completed_at: datetime), @collection=true>, #<ActiveRecord::Reflection::AssociationReflection:0x000001017b0b68 @macro=:has_many, @name=:logs, @options={:dependent=>:destroy, :extend=>[]}, @active_record=Event(id: integer, type: string, asset_id: integer, user_id: integer, title: string, description: text, start: datetime, stop: datetime, reoccurrence_id: integer, exclusive: boolean, organizer_notes: text, guest_notes: text, location: string, created_at: datetime, updated_at: datetime, schedule_type: text, completed_at: datetime), @collection=true, @class_name="Log", @klass=Log(id: integer, event_id: integer, user_id: integer, type: string, remarks: text, created_at: datetime, updated_at: datetime), @quoted_table_name="\"logs\"", @primary_key_name="event_id">, #<ActiveRecord::Reflection::AssociationReflection:0x00000101793d38 @macro=:has_many, @name=:comments, @options={:as=>:commented, :extend=>[]}, @active_record=Event(id: integer, type: string, asset_id: integer, user_id: integer, title: string, description: text, start: datetime, stop: datetime, reoccurrence_id: integer, exclusive: boolean, organizer_notes: text, guest_notes: text, location: string, created_at: datetime, updated_at: datetime, schedule_type: text, completed_at: datetime), @collection=true>, #<ActiveRecord::Reflection::AssociationReflection:0x00000101777688 @macro=:has_one, @name=:event_log, @options={:conditions=>{:user_id=>nil}, :class_name=>"Log"}, @active_record=Event(id: integer, type: string, asset_id: integer, user_id: integer, title: string, description: text, start: datetime, stop: datetime, reoccurrence_id: integer, exclusive: boolean, organizer_notes: text, guest_notes: text, location: string, created_at: datetime, updated_at: datetime, schedule_type: text, completed_at: datetime), @collection=false>, #<ActiveRecord::Reflection::AssociationReflection:0x00000101768cf0 @macro=:has_many, @name=:attachment_links, @options={:as=>:link, :extend=>[]}, @active_record=Event(id: integer, type: string, asset_id: integer, user_id: integer, title: string, description: text, start: datetime, stop: datetime, reoccurrence_id: integer, exclusive: boolean, organizer_notes: text, guest_notes: text, location: string, created_at: datetime, updated_at: datetime, schedule_type: text, completed_at: datetime), @collection=true>, #<ActiveRecord::Reflection::ThroughReflection:0x000001051ff850 @macro=:has_many, @name=:attachments, @options={:through=>:attachment_links, :extend=>[]}, @active_record=Event(id: integer, type: string, asset_id: integer, user_id: integer, title: string, description: text, start: datetime, stop: datetime, reoccurrence_id: integer, exclusive: boolean, organizer_notes: text, guest_notes: text, location: string, created_at: datetime, updated_at: datetime, schedule_type: text, completed_at: datetime), @collection=true>, #<ActiveRecord::Reflection::AssociationReflection:0x000001051dc4b8 @macro=:has_many, @name=:document_links, @options={:as=>:link, :extend=>[]}, @active_record=Event(id: integer, type: string, asset_id: integer, user_id: integer, title: string, description: text, start: datetime, stop: datetime, reoccurrence_id: integer, exclusive: boolean, organizer_notes: text, guest_notes: text, location: string, created_at: datetime, updated_at: datetime, schedule_type: text, completed_at: datetime), @collection=true>, #<ActiveRecord::Reflection::ThroughReflection:0x000001051c3490 @macro=:has_many, @name=:documents, @options={:through=>:document_links, :extend=>[]}, @active_record=Event(id: integer, type: string, asset_id: integer, user_id: integer, title: string, description: text, start: datetime, stop: datetime, reoccurrence_id: integer, exclusive: boolean, organizer_notes: text, guest_notes: text, location: string, created_at: datetime, updated_at: datetime, schedule_type: text, completed_at: datetime), @collection=true>]
ruby-1.9.2-p0 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment