Skip to content

Instantly share code, notes, and snippets.

@liangzan
Created September 5, 2010 02:59
Show Gist options
  • Save liangzan/565696 to your computer and use it in GitHub Desktop.
Save liangzan/565696 to your computer and use it in GitHub Desktop.
# rails console
>> Child.reflect_on_association(:parent)
Child.reflect_on_association(:parent)
=> #<ActiveRecord::Reflection::AssociationReflection:0xb4828958
@options={},
@collection=false,
@name=:parent,
@active_record=Child(id: integer, name: string, parent_id: integer),
@macro=:belongs_to>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment