lib/property_sets/active_record_extension.rb
# This finder method returns the property if present, otherwise a new instance with the default value.
# It does not have the side effect of adding a new setting object.
This finder method returns the property if present, otherwise a new instance with the default value.
It does not have the side effect of adding a new setting object.
This finder method returns the property if present otherwise a new instance with the default value . It does not have the side effect of adding a new setting object .
def lookup_or_default(arg)
        instance = lookup_without_default(arg)
        instance ||= association_class.new(:value => association_class.raw_default(arg))
        instance.value_serialized = property_serialized?(arg)
        instance
      end
def lookup_or_default ( arg ) instance = lookup_without_default ( arg ) instance ||= association_class . new ( :value => association_class . raw_default ( arg ) ) instance . value_serialized = property_serialized? ( arg ) instance end
This finder method returns the property if present, otherwise a new instance with the default value.
This finder method returns the property if present otherwise a new instance with the default value .
arg
<not_specific>