Module: Mongoid::Relations::Accessors
- Defined in:
- lib/custom_fields/extensions/mongoid/relations/accessors.rb
Instance Method Summary (collapse)
-
- (Proxy) build_with_custom_fields(name, object, metadata)
Builds the related document and creates the relation based on the class enhanced by the custom_fields functionnality (if set up for the relation).
Instance Method Details
- (Proxy) build_with_custom_fields(name, object, metadata)
Builds the related document and creates the relation based on the class enhanced by the custom_fields functionnality (if set up for the relation).
18 19 20 21 22 23 24 25 |
# File 'lib/custom_fields/extensions/mongoid/relations/accessors.rb', line 18 def build_with_custom_fields(name, object, ) if self.respond_to?(:custom_fields_for?) && self.custom_fields_for?(.name) # puts "[Accessors] build_with_custom_fields #{name}" = self.() end build_without_custom_fields(name, object, ) end |