i18n_lazy_scope 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18f90e57b24abf6b4891a68967366415def5e64b
|
4
|
+
data.tar.gz: fd2fb05699dfdb18f12e28083348cbb398962138
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55e7b010ad2a2a504c89cefa0e4c34c3b230bd5da39e6f91e10630b8389b8ab8f6350f922dd913ab6e2967d0187d9394c859dac5f3fc167045707b72c0c20b19
|
7
|
+
data.tar.gz: 450537099d921b4b3d050c6a60dcc44cfa24e7a2d9133c3cb3027bb0316bc4d2d3316dd27dae721227f3ff96565370b414f5955f9da0061ec60148980c2eddd5
|
@@ -1,10 +1,6 @@
|
|
1
1
|
module I18nLazyScope::ActionView
|
2
2
|
module Helper
|
3
|
-
def
|
4
|
-
t(key, scope: lazy_scope(key), **args)
|
5
|
-
end
|
6
|
-
|
7
|
-
def lazy_scope(key)
|
3
|
+
def lazy_scope
|
8
4
|
[:views, view_path]
|
9
5
|
end
|
10
6
|
|
@@ -14,7 +10,7 @@ module I18nLazyScope::ActionView
|
|
14
10
|
if @virtual_path
|
15
11
|
@virtual_path.gsub(%r{/_?}, ".")
|
16
12
|
else
|
17
|
-
raise "Cannot use
|
13
|
+
raise "Cannot use lazy lookup because template path is not available"
|
18
14
|
end
|
19
15
|
end
|
20
16
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
require "i18n_lazy_scope/helper"
|
2
1
|
require "i18n_lazy_scope/action_controller/helper"
|
3
2
|
require "i18n_lazy_scope/action_mailer/helper"
|
4
3
|
require "i18n_lazy_scope/action_view/helper"
|
5
4
|
|
5
|
+
require "i18n_lazy_scope/helper"
|
6
|
+
|
6
7
|
require "i18n"
|
7
8
|
|
8
9
|
RSpec.configure do |config|
|