Class: MongoMapper::Plugins::Associations::ManyDocumentsProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/mongo_mapper_ext/mongo_mapper/fixes.rb

Instance Method Summary collapse

Instance Method Details

#foreign_keyObject



44
45
46
47
# File 'lib/mongo_mapper_ext/mongo_mapper/fixes.rb', line 44

def foreign_key
  # options[:foreign_key] || proxy_owner.class.name.to_s.underscore.gsub("/", "_") + "_id"
  options[:foreign_key] || proxy_owner.class.alias.to_s.underscore.gsub("/", "_") + "_id"
end