diff options
| author | Sean Griffin <sean@thoughtbot.com> | 2014-11-18 13:40:03 -0800 |
|---|---|---|
| committer | Sean Griffin <sean@thoughtbot.com> | 2014-11-18 13:41:20 -0800 |
| commit | 52fddcc653458456f98b3683dffd781cf00b35fe (patch) | |
| tree | 7e78f34da766b2959e926a07f7f9672567c19241 /activemodel/test/validators/namespace/email_validator.rb | |
| parent | 1b9e85dbbd7d974143e67affb3166d7244cc99db (diff) | |
| download | rails-52fddcc653458456f98b3683dffd781cf00b35fe.tar.gz rails-52fddcc653458456f98b3683dffd781cf00b35fe.tar.bz2 rails-52fddcc653458456f98b3683dffd781cf00b35fe.zip | |
Speed up integer casting from DB
We don't have the check the range when the value is coming from the DB,
so override type_cast_from_database to short-circuit the extra work.
The difference is huge but the absolute gain is quite small. That being
said this is a hotspot and it showed up on the radar when benchmarking
discourse.
Diffstat (limited to 'activemodel/test/validators/namespace/email_validator.rb')
0 files changed, 0 insertions, 0 deletions
