class EntitySchema::Fields::FkBelongsTo
Fk
Attributes
observer_belongs_to[RW]
Public Class Methods
new(options)
click to toggle source
Calls superclass method
# File lib/entity_schema/fields/fk_belongs_to.rb, line 11 def initialize(options) @name = options[:fk] @src_key = options[:fk] super(options) end
Public Instance Methods
set(obj, value, notify_observer: true)
click to toggle source
Calls superclass method
# File lib/entity_schema/fields/fk_belongs_to.rb, line 17 def set(obj, value, notify_observer: true) super(obj, value).tap do |fk| observer_belongs_to.fk_changed(fk, obj) if notify_observer end end