Reflecting on associations

Is there an easy way to programatically work out the associations on a
model?

If not, is there a positive reason it was omitted, or is it just
something that
hasn’t been implemented yet?

Thanks
Gareth

Gareth A. wrote:

Is there an easy way to programatically work out the associations on a
model?

If not, is there a positive reason it was omitted, or is it just
something that
hasn’t been implemented yet?

Thanks
Gareth

This is something that I thought Dr. Nic was working on.

Dr. Nic?

On 16 Aug 2006, at 13:33, Gareth A. wrote:

Is there an easy way to programatically work out the associations
on a model?

Have you looked at ActiveRecord.reflections?
http://railsmanual.com/module/ActiveRecord%3A%3AReflection%3A%
3AClassMethods

Jonathan del Strother <maillist@…> writes:

On 16 Aug 2006, at 13:33, Gareth A. wrote:

Is there an easy way to programatically work out the associations
on a model?

Have you looked at ActiveRecord.reflections?
http://railsmanual.com/module/ActiveRecord%3A%3AReflection%3A%
3AClassMethods

I have now - that’s exactly what I needed. Thank you :slight_smile:

Gareth