Anybody know how to find out all the class names that a model has
specified as “has_many”? I’m hoping there’s some sort of an array I
can access.
OK, answered my own question:
ActiveRecord::Reflection
Anybody know how to find out all the class names that a model has
specified as “has_many”? I’m hoping there’s some sort of an array I
can access.
OK, answered my own question:
ActiveRecord::Reflection
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs