RAILS: How to get has_many associations of a model
- by Pioz
Hi, how I can get the has_many associations of a model?
For example if I have this class:
class A < ActiveRecord::Base
has_many B
has_many C
end
I would a method like this:
A.get_has_many
that return
[B,C]
Is it possible? Thanks!