custom_fields 2.4.0.rc4 → 2.4.0.rc5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8162bf466478ef2edd666967a9b5b719925456ad
4
- data.tar.gz: 663b7c71aa66a5aea37d513b72ef5bcf1df0f56d
3
+ metadata.gz: c59df522a773c83afb22a2378a12e14dce6cd8b3
4
+ data.tar.gz: d74bbf77539f97cc86e993ff8ae0cecdd21f8bc2
5
5
  SHA512:
6
- metadata.gz: e8e5465400c8ad36381c687b8466bd1f0f8778e3f06d8b91ee01d85e35c2da46982fb2714503763d9ba843dd96747aaa367982994a375f3e20e7de851b860cc4
7
- data.tar.gz: 7d72957c190985562b8a3b92a13c8e8df599b4fd9a3488d4fe4fddff6da63f3f5556821cf67858a889c15add3dc052d87bf80c05bbe7e672096f6efab075860f
6
+ metadata.gz: 3b1b96bc1e316bb42c4760444a358e38ae77ea07adcb9448b2defb12695505e9b6afa205f28ec8f6a7e292924fc39c10e6cff255ea8717d464b88acfdac32354
7
+ data.tar.gz: e6a53bca57082c639dccca3b06aed49a952ae59482918b583de4db343fd13b06ca97d18f537c8a89244ae82ea373d4e9e7e729decc9d83b2963d0b196f5790ea
@@ -20,10 +20,10 @@ module Mongoid #:nodoc
20
20
  end
21
21
 
22
22
  def self.fallbacks
23
- if ::I18n.respond_to?(:fallbacks)
24
- ::I18n.fallbacks
25
- elsif !self.instance.fallbacks.blank?
23
+ if !self.instance.fallbacks.blank?
26
24
  self.instance.fallbacks
25
+ elsif ::I18n.respond_to?(:fallbacks)
26
+ ::I18n.fallbacks
27
27
  else
28
28
  nil
29
29
  end
@@ -35,7 +35,11 @@ module Mongoid #:nodoc
35
35
  end
36
36
 
37
37
  def self.fallbacks?
38
- ::I18n.respond_to?(:fallbacks) || !self.instance.fallbacks.blank?
38
+ !self.instance.fallbacks.blank? || ::I18n.respond_to?(:fallbacks)
39
+ end
40
+
41
+ def self.clear_fallbacks
42
+ self.instance.fallbacks.try(:clear)
39
43
  end
40
44
 
41
45
  def self.with_locale(new_locale = nil)
@@ -52,4 +56,4 @@ module Mongoid #:nodoc
52
56
 
53
57
  end
54
58
 
55
- end
59
+ end
@@ -1,5 +1,5 @@
1
1
  module CustomFields #:nodoc
2
2
 
3
- VERSION = '2.4.0.rc4'
3
+ VERSION = '2.4.0.rc5'
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.rc4
4
+ version: 2.4.0.rc5
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-09-06 00:00:00.000000000 Z
11
+ date: 2015-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid