lib/mongoid_schema_dump.rb
def has_many(from_klass, to_klass)
    all_has_many = from_klass.relations.map(&:second).select do |r| 
      r.macro == :has_many && r.class_name == to_klass.to_s
    end.map(&:class_name)
  end
#returns all has_many relation class names
returns all has_many relation class names
returns all has_many relation class names
def has_many(from_klass, to_klass)
    all_has_many = from_klass.relations.map(&:second).select do |r| 
      r.macro == :has_many && r.class_name == to_klass.to_s
    end.map(&:class_name)
  end
def has_many ( from_klass , to_klass ) all_has_many = from_klass . relations . map ( & :second ) . select do | r | r . macro == :has_many && r . class_name == to_klass . to_s end . map ( & :class_name ) end
returns all has_many relation class names
returns all has_many relation class names
from_klass
to_klass