custom_fields 2.4.0.rc7 → 2.4.0.rc8

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: 87df1a5363f364270445953e385d170011067511
4
- data.tar.gz: a19f613def98a8e1645d0eeedebda766e2a4871c
3
+ metadata.gz: 7ba2aeae230edf053fc45cbda55706005ea32d70
4
+ data.tar.gz: 8a8fc2cf5e76048ef5929fa407fab0a2a93ba9bd
5
5
  SHA512:
6
- metadata.gz: 73b12b42934e2a35e19e8a4562f4ecfd48b82b39c3e9e775128b9bc4d6a3b421f491725d3c833ee873d30bf967d4dc6234bd9865a988cf10ce2597710c5cc203
7
- data.tar.gz: 5bf856dc422e77f8fbffc11133584b85fa5625ed3faa00db61a4169da6877bcafb4bff4b498affb8c0a90429d12c4e59186bef93f3c42f4e76329c6ec26bc19b
6
+ metadata.gz: 1273ea64be5da4bf7ebc5a663db3732704ac2c0d6a05cb93376f01a9dc8983c074825f7ffdd515caab1d60a1d5559c007bbc78cb8a5d496309d6003522b615ee
7
+ data.tar.gz: 8012984eeb350f8a438317193adb2a7bfefcaa9959fe4243de7caf0dc0e64684444d0e791f3a56815c4bb34fcb03960f993768b772bea9e110ad1f014d602f1f
@@ -35,6 +35,7 @@ end
35
35
  extensions/mongoid/fields/localized.rb
36
36
  extensions/mongoid/validations/collection_size.rb
37
37
  extensions/mongoid/validations/macros.rb
38
+ extensions/mongoid/attributes
38
39
  extensions/origin/smash.rb
39
40
  types/default
40
41
  types/string
@@ -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
@@ -1,5 +1,5 @@
1
1
  module CustomFields #:nodoc
2
2
 
3
- VERSION = '2.4.0.rc7'
3
+ VERSION = '2.4.0.rc8'
4
4
 
5
5
  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.rc7
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-24 00:00:00.000000000 Z
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