patch for token generator throttling inserts to 1/sec

Because the new simplified ActiveRecord::Base#inspect no longer includes the memory offset, a series of ActiveRecord objects created (without attributes) in quick succession will have the same inspect value.

This makes #inspect insufficient for generating unique tokens. In practice, this means creation of token_generator objects involves running as many select queries as the server can handle for one second, then making the insert, and running selects again... repeat.

The fix is simple and included in the patch here:

I've got two +1s on this patch, and just need another before it can be applied.

Thanks anyone especially if you use the token_generator plugin on trunk rails!

+1 verified