I want to, when given a particular model, return all the related models it is associated with. For example:
class Dog < ActiveRecord::Base
has_many :bones
belongs_to :master
end
d = Dog.first
d.associations #<== should return [Bone, Master]
Is there a way to do this already without having to roll my own? Failing that, any suggestions for the best way to do this?