Class: NestedAttr::NestedAttributesStrategy

Inherits:
Object
  • Object
show all
Includes:
NestedAttr
Defined in:
lib/nested_attr.rb

Constant Summary

Constants included from NestedAttr

VERSION

Instance Method Summary collapse

Methods included from NestedAttr

nested_attr_for

Instance Method Details

#association(runner) ⇒ Object



24
25
26
# File 'lib/nested_attr.rb', line 24

def association(runner)
  runner.run
end

#result(evaluation) ⇒ Object



28
29
30
31
32
33
34
35
36
# File 'lib/nested_attr.rb', line 28

def result(evaluation)

  evaluation.object.tap do |instance|
  
    evaluation.notify(:after_build, instance) 
    
    return attributes(instance)
  end
end