tip4commit/tip4commit — pull request #42 by Bharat311 (2014-02-22 09:05:32+00:00)
Title: Optimize login_token generation

Whenever we are generating the login_token for a user, currently, it is firing 2 queries to the DB, 1 for the 'create' and 1 for the 'update' login_token statement.

If we set the login_token in a :before_create callback we would still have the update within the transaction plus the login_token would get saved in the 'create' statement itself.