whowish_word 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -36,7 +36,7 @@ class WhowishWordController < ApplicationController
|
|
36
36
|
filename = "#{keys[1..-1].join("_")}_#{filename}"
|
37
37
|
end
|
38
38
|
|
39
|
-
paths = [
|
39
|
+
paths = [ WhowishWord.config_file_dir ]
|
40
40
|
paths.push(keys[0]) if keys.length > 0
|
41
41
|
paths.push(filename)
|
42
42
|
|
@@ -9,15 +9,17 @@ module WhowishWord
|
|
9
9
|
include WhowishWord::Initializer
|
10
10
|
include WhowishWord::WordFor
|
11
11
|
# include WhowishWord::Authentication
|
12
|
+
|
13
|
+
attr_accessor :config_file_dir
|
12
14
|
|
13
|
-
|
14
|
-
|
15
|
-
def init()
|
15
|
+
def init(config_file_dir = File.join(Rails.root, 'config', 'locales', 'whowish_word'))
|
16
16
|
install_route
|
17
17
|
install_hook
|
18
18
|
load_rails
|
19
|
+
|
20
|
+
@config_file_dir = config_file_dir
|
19
21
|
|
20
|
-
Rails.configuration.i18n.load_path
|
22
|
+
Rails.configuration.i18n.load_path = Dir[File.join(@config_file_dir, '**', '*.{rb,yml}')]
|
21
23
|
|
22
24
|
I18n.class_eval do
|
23
25
|
class << self
|
data/whowish_word.gemspec
CHANGED