translatable_ar 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/active_record_base.rb +2 -1
- metadata +8 -12
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0ead99184da035ab12c9b9d04db13533650cf3e8
|
4
|
+
data.tar.gz: 97420e661d030e6aa85d601a2fa4fecc4dde3558
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1cd44355aca899a10b9e02ab38a6c4384d543516754812092ac704ee5858faf7c34be843d98475069d84660353fc4c10737b916d91c2cfe1197625aef7794e93
|
7
|
+
data.tar.gz: 38fb2ab18f5c5d7b5639c0ee18aec7b38fb56a1d6d66153c02e1f48f7099ad81bfdbc8964cb357871154fe688ef31208b775848bbf3e486345e14ae6060b74d8
|
data/lib/active_record_base.rb
CHANGED
@@ -81,7 +81,8 @@ class TranslatableAR
|
|
81
81
|
def define_translatable_ar_before_type_cast(attribute)
|
82
82
|
define_method("#{attribute}_before_type_cast") do
|
83
83
|
if respond_to?("#{attribute}_i18n")
|
84
|
-
send("#{attribute}_i18n")
|
84
|
+
i18n = send("#{attribute}_i18n") || {}
|
85
|
+
i18n[I18n.locale.to_s]
|
85
86
|
else
|
86
87
|
super()
|
87
88
|
end
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: translatable_ar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Kasper Bjørn Nielsen
|
@@ -14,17 +13,15 @@ dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: activerecord
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
description: Translations are saved in-column as a serialized hash or using HStore.
|
@@ -40,27 +37,26 @@ files:
|
|
40
37
|
- lib/translatable_ar_class.rb
|
41
38
|
homepage: http://github.com/kasperbn/translatable_ar
|
42
39
|
licenses: []
|
40
|
+
metadata: {}
|
43
41
|
post_install_message:
|
44
42
|
rdoc_options: []
|
45
43
|
require_paths:
|
46
44
|
- lib
|
47
45
|
- lib
|
48
46
|
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
47
|
requirements:
|
51
|
-
- -
|
48
|
+
- - ">="
|
52
49
|
- !ruby/object:Gem::Version
|
53
50
|
version: '0'
|
54
51
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
|
-
none: false
|
56
52
|
requirements:
|
57
|
-
- -
|
53
|
+
- - ">="
|
58
54
|
- !ruby/object:Gem::Version
|
59
55
|
version: '0'
|
60
56
|
requirements: []
|
61
57
|
rubyforge_project:
|
62
|
-
rubygems_version:
|
58
|
+
rubygems_version: 2.2.2
|
63
59
|
signing_key:
|
64
|
-
specification_version:
|
60
|
+
specification_version: 4
|
65
61
|
summary: i18n for your active record models with HStore attribute
|
66
62
|
test_files: []
|