lib/volt/models/persistors/cookies.rb
# Callled when an cookies value is changed
Callled when an cookies value is changed
Callled when an cookies value is changed
def changed(attribute_name)
        unless $writing_cookies
          value = @model.read_attribute(attribute_name)
          write_cookie(attribute_name, value.to_s, expires: Time.now + (356 * 24 * 60 * 60))
        end
      end
def changed ( attribute_name ) unless $writing_cookies value = @model . read_attribute ( attribute_name ) write_cookie ( attribute_name , value . to_s , expires : Time . now + ( 356 * 24 * 60 * 60 ) ) end end
Callled when an cookies value is changed
Callled when an cookies value is changed
# TODO: Make sure we're only assigning directly, not sub models # Temp, expire in 1 year, going to expand this api
attribute_name