Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[Performance] Doing to 2 separate calls is faster.

  • Loading branch information...
commit cf689a9b3a182e2baf32eb2d8ce629d15ba0e8c7 1 parent 79a37c3
@thedarkone authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/i18n/backend/base.rb
View
3  lib/i18n/backend/base.rb
@@ -31,7 +31,8 @@ def translate(locale, key, options = nil)
entry = key && lookup(locale, key, options && options[:scope], options)
if options
- count, default = options.values_at(:count, :default)
+ count = options[:count]
+ default = options[:default]
entry = entry.nil? && default ?
default(locale, key, default, options) : resolve(locale, key, entry, options)
else
Please sign in to comment.
Something went wrong with that request. Please try again.