Class: MongoMapper::Plugins::Associations::ManyDocumentsProxy
- Inherits:
-
Object
- Object
- MongoMapper::Plugins::Associations::ManyDocumentsProxy
- Defined in:
- lib/mongo_mapper_ext/mongo_mapper/fixes.rb
Instance Method Summary collapse
Instance Method Details
#foreign_key ⇒ Object
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" [:foreign_key] || proxy_owner.class.alias.to_s.underscore.gsub("/", "_") + "_id" end |