Class: ArSync::HasOneField
- Inherits:
-
Field
- Object
- Field
- ArSync::HasOneField
show all
- Defined in:
- lib/ar_sync/field.rb
Instance Attribute Summary
Attributes inherited from Field
#name
Instance Method Summary
collapse
Methods inherited from Field
#action_convert, #initialize, #order_param, #skip_propagation?
Constructor Details
This class inherits a constructor from ArSync::Field
Instance Method Details
#data(_parent, child, action:) ⇒ Object
45
46
47
|
# File 'lib/ar_sync/field.rb', line 45
def data(_parent, child, action:, **)
child._sync_data new_record: action == :create
end
|
#path(_child) ⇒ Object
49
50
51
|
# File 'lib/ar_sync/field.rb', line 49
def path(_child)
[name]
end
|
#type ⇒ Object
41
42
43
|
# File 'lib/ar_sync/field.rb', line 41
def type
:one
end
|