xduration 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/duration/rails/engine.rb +11 -1
- data/lib/duration/version.rb +1 -1
- metadata +1 -1
@@ -2,7 +2,17 @@ module RubyDuration
|
|
2
2
|
module Rails
|
3
3
|
class Engine < ::Rails::Engine
|
4
4
|
initializer 'duration setup' do
|
5
|
-
|
5
|
+
unless locale_files.blank?
|
6
|
+
locale_files.each do |file|
|
7
|
+
I18n.load_path << file
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def locale_files
|
13
|
+
@locale_files ||= Dir[::Rails.root.join('config', 'locales', 'duration', '*.yml')]
|
14
|
+
rescue
|
15
|
+
[]
|
6
16
|
end
|
7
17
|
end
|
8
18
|
end
|
data/lib/duration/version.rb
CHANGED