class Terrestrial::Configurations::ConventionalConfiguration::ArbitraryDatabaseOwnedValueObserver
TODO: It is very tempting to implement database generated IDs in terms of this
Attributes
field_name[R]
setter[R]
Public Class Methods
new(field_name, setter)
click to toggle source
# File lib/terrestrial/configurations/conventional_configuration.rb, line 367 def initialize(field_name, setter) @field_name = field_name @setter = setter end
Public Instance Methods
post_save(mapping, object, record, new_record)
click to toggle source
# File lib/terrestrial/configurations/conventional_configuration.rb, line 378 def post_save(mapping, object, record, new_record) setter.call(object, new_record.get(field_name)) end
post_serialize(*_args)
click to toggle source
# File lib/terrestrial/configurations/conventional_configuration.rb, line 375 def post_serialize(*_args) end