lib/smart_session/sql_session.rb
def update_session_optimistically data
      update_attribute('data', data)
      true
    rescue ActiveRecord::StaleObjectError
      false
    end
# update session data using optimistic locking - return true on success, false if the record was stale

update session data using optimistic locking - return true on success, false if the record was stale
update session data using optimistic locking - return true on success false if the record was stale
def update_session_optimistically data
      update_attribute('data', data)
      true
    rescue ActiveRecord::StaleObjectError
      false
    end
def update_session_optimistically data update_attribute ( 'data' , data ) true rescue ActiveRecord :: StaleObjectError false end
update session data using optimistic locking - return true on success, false if the record was stale
update session data using optimistic locking - return true on success false if the record was stale
data