custom_fields 2.3.2 → 2.3.3

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: 72c3c8e193eb2324800d6718260672b8a1bd6aaf
4
- data.tar.gz: 269f5073245c71a88b20eb1da47cacab116c55c0
3
+ metadata.gz: 4c97a9164b3261a278b1f3301269d033c3745924
4
+ data.tar.gz: ab3202cae5b8b60bfcb29d417d405c9eeadefb9d
5
5
  SHA512:
6
- metadata.gz: db1aef98d5992fd7611e64b469c01216c9ccecf101aecdee36060418cc5993142661d8fd852e0f095917df93dc6a7e951971a451720696d56e0769d3be787b0b
7
- data.tar.gz: 75cf473439bb423f18b48223ac252b798eb3d45d4280157aa49f9a87fdca7e528a25ddee64a8187def6b4045f7d7cf65bab1d7624c60aa24251d8cb138e5ce80
6
+ metadata.gz: ffab683cf013c7a8370f77d3f09804217e5710c89f2d560f2a1e2fb56df8cab72887667e37a5ba75fa8ae2c8979ac9b1456ab5d5ec839e06cbe9849ca10f98d3
7
+ data.tar.gz: 24302382c64724b139af6d0fd6d1d9eac2e411f43ca255df746cefff608b24ec3f8abc5f96289eba5f7d264c886d3c3cec2b414f6142af5753e96b779e7699f3
@@ -12,7 +12,7 @@ The main goals:
12
12
 
13
13
  h2. Requirements
14
14
 
15
- ActiveSupport 3.2.13, MongoDB 2.0 and Mongoid 3.1.3
15
+ Ruby 2.1.x, ActiveSupport 3.2.21, MongoDB 2.0 and Mongoid 3.1.3
16
16
 
17
17
  h2. Examples
18
18
 
@@ -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,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module CustomFields #:nodoc
3
3
 
4
- VERSION = '2.3.2'
4
+ VERSION = '2.3.3'
5
5
 
6
6
  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.3.2
4
+ version: 2.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Didier Lafforgue
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-15 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
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 3.2.13
33
+ version: 3.2.21
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 3.2.13
40
+ version: 3.2.21
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: carrierwave-mongoid
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -235,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
235
  version: 1.3.6
236
236
  requirements: []
237
237
  rubyforge_project: nowarning
238
- rubygems_version: 2.2.2
238
+ rubygems_version: 2.2.0
239
239
  signing_key:
240
240
  specification_version: 4
241
241
  summary: Custom fields extension for Mongoid