localizable_model 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/localizable_model/scope_extension.rb +11 -2
- data/lib/localizable_model/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6117f00c6fec1025aa330022a84f21cad2eece0
|
4
|
+
data.tar.gz: f9902eea37e398d8ed818d0ce201197875ca73cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d60c8b41363ce53ebadf021d3d810b14dd4ebdbdebe5c141a2644ea0e8b35a4f375f4efd2acb2ff5177d9d4b56467625202560977dd90e937fecda88bf145481
|
7
|
+
data.tar.gz: f3e8a3c0481c3f6f89b6f1f9f3ce5092b932706af78e983b90a2600881ef9eb971706313506772dd6342d9e9dc532f0a4484f6daaac75445bcb93327c6c4e2fd
|
@@ -10,11 +10,20 @@ module LocalizableModel
|
|
10
10
|
|
11
11
|
def localize(locale)
|
12
12
|
@locale = locale
|
13
|
+
localize_records if loaded?
|
13
14
|
self
|
14
15
|
end
|
15
16
|
|
16
|
-
def
|
17
|
-
super
|
17
|
+
def load
|
18
|
+
super
|
19
|
+
localize_records
|
20
|
+
self
|
21
|
+
end
|
22
|
+
|
23
|
+
protected
|
24
|
+
|
25
|
+
def localize_records
|
26
|
+
@records.each { |r| r.localize!(@locale) }
|
18
27
|
end
|
19
28
|
end
|
20
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: localizable_model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Inge Jørgensen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mysql2
|