class EntitySchema::Fields::ObjectBelongsTo

Withoutfk

Attributes

observer_belongs_to[RW]

Public Instance Methods

set(obj, value, notify_observer: true) click to toggle source
Calls superclass method EntitySchema::Fields::Abstract#set
# File lib/entity_schema/fields/object_belongs_to.rb, line 11
def set(obj, value, notify_observer: true)
  super(obj, value).tap do |new_object|
    observer_belongs_to.object_changed(new_object, obj) if notify_observer
  end
end