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 <
You should be using ActiveRecord reflections.
Then you can type something like this:
A.reflect_on_all_associations.map { |assoc| assoc.name}
which will return your array
[:B, :C]