classThing<ActiveRecord::Basebelongs_to:foobelongs_to:barend# this would return a hash of all `belongs_to` reflections, in this case:# { :foo => (the Foo Reflection), :bar => (the Bar Reflection) }reflections=Thing.reflections.selectdo|association_name,reflection|reflection.macro==:belongs_toend