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 Adams 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 > GarethThis is something that I thought Dr. Nic was working on. Dr. Nic? -- Posted via http://www.ruby-forum.com/.
On 16 Aug 2006, at 13:33, Gareth Adams 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 Adams 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 :) Gareth