lib/eav_hashes/eav_entry.rb
def serialize_value
        # Returning nil will prevent the row from being saved, to save some time since the EavHash that manages this
        # entry will have marked it for deletion.
        raise "Tried to save with a nil value!" if @value.nil? or @value.is_a? NilPlaceholder

        update_value_type
        if value_type == SUPPORTED_TYPES[:Object]
          write_attribute :value, YAML::dump(@value)
        else
          write_attribute :value, @value.to_s
        end

        read_attribute :value
      end
# Converts the value to its database-storable form and tells ActiveRecord that it's been changed (if it has)
Converts the value to its database-storable form and tells ActiveRecord that it's been changed (if it has)
Converts the value to its database - storable form and tells ActiveRecord that it ' s been changed ( if it has )
def serialize_value
        raise "Tried to save with a nil value!" if @value.nil? or @value.is_a? NilPlaceholder
        update_value_type
        if value_type == SUPPORTED_TYPES[:Object]
          write_attribute :value, YAML::dump(@value)
        else
          write_attribute :value, @value.to_s
        end
        read_attribute :value
      end
def serialize_value raise "Tried to save with a nil value!" if @value . nil? or @value . is_a? NilPlaceholder update_value_type if value_type == SUPPORTED_TYPES [ :Object ] write_attribute :value , YAML :: dump ( @value ) else write_attribute :value , @value . to_s end read_attribute :value end
Converts the value to its database-storable form and tells ActiveRecord that it's been changed (if it has)
Converts the value to its database - storable form and tells ActiveRecord that it ' s been changed ( if it has )
# Returning nil will prevent the row from being saved, to save some time since the EavHash that manages this # entry will have marked it for deletion.