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 +4 -4
- data/README.textile +1 -1
- data/lib/custom_fields/extensions/mongoid/fields/i18n.rb +9 -5
- data/lib/custom_fields/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c97a9164b3261a278b1f3301269d033c3745924
|
4
|
+
data.tar.gz: ab3202cae5b8b60bfcb29d417d405c9eeadefb9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffab683cf013c7a8370f77d3f09804217e5710c89f2d560f2a1e2fb56df8cab72887667e37a5ba75fa8ae2c8979ac9b1456ab5d5ec839e06cbe9849ca10f98d3
|
7
|
+
data.tar.gz: 24302382c64724b139af6d0fd6d1d9eac2e411f43ca255df746cefff608b24ec3f8abc5f96289eba5f7d264c886d3c3cec2b414f6142af5753e96b779e7699f3
|
data/README.textile
CHANGED
@@ -20,10 +20,10 @@ module Mongoid #:nodoc
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def self.fallbacks
|
23
|
-
if
|
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)
|
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
|
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.
|
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:
|
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.
|
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.
|
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.
|
238
|
+
rubygems_version: 2.2.0
|
239
239
|
signing_key:
|
240
240
|
specification_version: 4
|
241
241
|
summary: Custom fields extension for Mongoid
|