Class: Congo::Metadata::Association
- Inherits:
-
Object
- Object
- Congo::Metadata::Association
- Includes:
- MongoMapper::EmbeddedDocument
- Defined in:
- lib/congo/metadata/association.rb
Instance Method Summary collapse
Instance Method Details
#apply(klass, scope) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/congo/metadata/association.rb', line 16 def apply(klass, scope) klass.send(type, name, :class => scope.content_type_as_const(name.classify)) if type.to_sym == :belongs_to klass.key name.foreign_key, String end end |