translateable_attributes 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +3 -0
- data/lib/translateable_attributes/methods.rb +3 -1
- data/lib/translateable_attributes/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08b5e2a012385947321e5c7be4cb4f87337d9fcd3e0533e23bc2d9fef4e28d4d'
|
4
|
+
data.tar.gz: 9fc725b5dc4b6182575f3542c07a29a04dae1ff0602cbc1907b8991820e9dae1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0c0d8d2cf87dcbbdd1da233311c975a966da5618aac09877d9a1317bf0ca3ce43a25a79ac04f6e06179483227da1c3f185055ea2637f4e7e626418e3417c49f
|
7
|
+
data.tar.gz: 30844cf23593caade015461f43f3b84296477a8b406a85924435185ca9a44d56962f31f6ea098e7cc27a21548e2c67cdb2cee876586c82714306f2dd5fa7c063
|
data/HISTORY.md
CHANGED
@@ -11,7 +11,9 @@ module TranslateableAttributes
|
|
11
11
|
end
|
12
12
|
|
13
13
|
define_singleton_method "#{plural_attribute}_for_select" do
|
14
|
-
I18n.t(namespace
|
14
|
+
options = I18n.t(namespace, default: nil) || []
|
15
|
+
|
16
|
+
options.each_with_object([]) do |(value, translation), collection|
|
15
17
|
collection << [translation, value]
|
16
18
|
end
|
17
19
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: translateable_attributes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toms Mikoss
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
- !ruby/object:Gem::Version
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
|
-
rubygems_version: 3.
|
139
|
+
rubygems_version: 3.3.17
|
140
140
|
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: Helper methods to display translated values of object attributes.
|