lib/property_sets/active_record_extension.rb
# The finder method which returns the property if present, otherwise a new instance with defaults
The finder method which returns the property if present, otherwise a new instance with defaults
The finder method which returns the property if present otherwise a new instance with defaults
def lookup(arg)
        instance   = lookup_without_default(arg)
        instance ||= build_default(arg)
        instance.value_serialized = property_serialized?(arg)
        owner = proxy_association.owner
        instance.send("#{association_class.owner_class_sym}=", owner) if owner.new_record?
        instance
      end
def lookup ( arg ) instance = lookup_without_default ( arg ) instance ||= build_default ( arg ) instance . value_serialized = property_serialized? ( arg ) owner = proxy_association . owner instance . send ( "#{association_class.owner_class_sym}=" , owner ) if owner . new_record? instance end
The finder method which returns the property if present, otherwise a new instance with defaults
The finder method which returns the property if present otherwise a new instance with defaults
arg
<not_specific>