We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2c059b commit 895f9a4Copy full SHA for 895f9a4
lib/ransack/translate.rb
@@ -1,6 +1,8 @@
1
require 'i18n'
2
3
-I18n.load_path += Dir[File.join(File.dirname(__FILE__), 'locale', '*.yml')]
+I18n.load_path += Dir[
4
+ File.join(File.dirname(__FILE__), 'locale'.freeze, '*.yml'.freeze)
5
+]
6
7
module Ransack
8
module Translate
@@ -149,7 +151,7 @@ def self.translated_ancestor_attributes
149
151
150
152
def self.i18n_key(klass)
153
if ActiveRecord::VERSION::MAJOR == 3 && ActiveRecord::VERSION::MINOR == 0
- klass.model_name.i18n_key.to_s.tr('.', '/')
154
+ klass.model_name.i18n_key.to_s.tr('.'.freeze, '/'.freeze)
155
else
156
klass.model_name.i18n_key.to_s
157
end
0 commit comments