Little things:

- Retries on deadlock when calculating average time
- Removes Warning: When specifying html format for errors
- Doesn't use manual SQL to update user's ip address
This commit is contained in:
Robin Ward
2013-02-11 15:47:28 -05:00
parent 6ce32b8bc4
commit 57049b55a2
4 changed files with 36 additions and 16 deletions

View File

@ -23,7 +23,7 @@ module CurrentUser
@current_user.update_last_seen!
if @current_user.ip_address != request.remote_ip
@current_user.ip_address = request.remote_ip
User.exec_sql('update users set ip_address = ? where id = ?', request.remote_ip, @current_user.id)
@current_user.update_column(:ip_address, request.remote_ip)
end
end
@current_user