diff options
author | Viktar Basharymau <viktar.basharymau@gmail.com> | 2017-08-18 14:35:43 +0300 |
---|---|---|
committer | Viktar Basharymau <viktar.basharymau@gmail.com> | 2017-08-18 17:36:59 +0300 |
commit | 53c98196e6cf809f5fdb69396e617fa6509085a3 (patch) | |
tree | 7b476d86a49c6e178ec4466047be085a29700500 /railties | |
parent | e183dc195a965371b1edc3ea18c54910758c32e3 (diff) | |
download | rails-53c98196e6cf809f5fdb69396e617fa6509085a3.tar.gz rails-53c98196e6cf809f5fdb69396e617fa6509085a3.tar.bz2 rails-53c98196e6cf809f5fdb69396e617fa6509085a3.zip |
Simplify ActiveModel::Errors#generate_message
Besides making the code easier to read, this commit
also makes it faster:
* We don't eval `@base.class.respond_to?(:i18n_scope)` twice
* We only eval `@base.class.i18n_scope` once
* We don't call `flatten!` because it's not needed anymore
* We don't call `compact` because all elements are Symbols
Diffstat (limited to 'railties')
0 files changed, 0 insertions, 0 deletions