ActiveRecord introspection

Hi,

I have a reasonably complex AR object, that has_many, contains foreign
keys, and so on. How can I get the names of all the ‘attribute
methods’? Getting the column names isn’t so difficult, but getting
the associations seems to be trickier…

Thanks,
Dave Welton

On May 14, 2007, at 2:40 PM, [email protected] wrote:

I have a reasonably complex AR object, that has_many, contains foreign
keys, and so on. How can I get the names of all the ‘attribute
methods’? Getting the column names isn’t so difficult, but getting
the associations seems to be trickier…

Take a look at the reflect_on_* methods in the API.

– fxn