custom_fields 2.4.0.rc7 → 2.4.0.rc8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/custom_fields.rb +1 -0
- data/lib/custom_fields/extensions/mongoid/attributes.rb +14 -0
- data/lib/custom_fields/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ba2aeae230edf053fc45cbda55706005ea32d70
|
4
|
+
data.tar.gz: 8a8fc2cf5e76048ef5929fa407fab0a2a93ba9bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1273ea64be5da4bf7ebc5a663db3732704ac2c0d6a05cb93376f01a9dc8983c074825f7ffdd515caab1d60a1d5559c007bbc78cb8a5d496309d6003522b615ee
|
7
|
+
data.tar.gz: 8012984eeb350f8a438317193adb2a7bfefcaa9959fe4243de7caf0dc0e64684444d0e791f3a56815c4bb34fcb03960f993768b772bea9e110ad1f014d602f1f
|
data/lib/custom_fields.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
module Mongoid
|
2
|
+
module Attributes
|
3
|
+
|
4
|
+
# FIXME: ::Mongoid::Fields::I18n.locale is also a valid locale
|
5
|
+
def selection_included?(name, selection, field)
|
6
|
+
if field && field.localized?
|
7
|
+
selection.has_key?("#{name}.#{::I18n.locale}") || selection.has_key?("#{name}.#{::Mongoid::Fields::I18n.locale}")
|
8
|
+
else
|
9
|
+
selection.has_key?(name)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: custom_fields
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.0.
|
4
|
+
version: 2.4.0.rc8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Didier Lafforgue
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|
@@ -211,6 +211,7 @@ files:
|
|
211
211
|
- lib/custom_fields.rb
|
212
212
|
- lib/custom_fields/extensions/active_support.rb
|
213
213
|
- lib/custom_fields/extensions/carrierwave.rb
|
214
|
+
- lib/custom_fields/extensions/mongoid/attributes.rb
|
214
215
|
- lib/custom_fields/extensions/mongoid/document.rb
|
215
216
|
- lib/custom_fields/extensions/mongoid/factory.rb
|
216
217
|
- lib/custom_fields/extensions/mongoid/fields.rb
|