contentful_model 0.0.6.1 → 0.0.7
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 +4 -4
- data/lib/contentful_model/base.rb +10 -2
- data/lib/contentful_model/queries.rb +1 -0
- data/lib/contentful_model/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f1199c6bcfa0312db762ee9d3a5873dbe082db12
|
|
4
|
+
data.tar.gz: c9ddc557291ce3eaca06cd860f53e2d1ad4a6401
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b577849558fb930dbf9479b620f7bfcdde58712eed7ba961dbb1edffd9d385cd0f0c3cde3cc3e9c805f92b7a8b9b7ffbfcc74dc5ba5794a713b8d2dff92d82d4
|
|
7
|
+
data.tar.gz: 1c64cc844615b9dc4d8c187d54fa650ca0ae71d9640a12f2c35e75a283153dc06e15278eb55d005f57492ebc1c1270076c5e8dca5726776f1a7ca6f21c8d8208
|
|
@@ -8,10 +8,10 @@ module ContentfulModel
|
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
#use method_missing to call fields on the model
|
|
11
|
-
def method_missing(method)
|
|
11
|
+
def method_missing(method, *args, &block)
|
|
12
12
|
result = fields[:"#{method.to_s.camelize(:lower)}"]
|
|
13
13
|
if result.nil?
|
|
14
|
-
|
|
14
|
+
super
|
|
15
15
|
else
|
|
16
16
|
if self.class.coercions[method].nil?
|
|
17
17
|
return result
|
|
@@ -21,6 +21,14 @@ module ContentfulModel
|
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
+
def respond_to_missing?(method, private=false)
|
|
25
|
+
if fields[:"#{method.to_s.camelize(:lower)}"].nil?
|
|
26
|
+
super
|
|
27
|
+
else
|
|
28
|
+
true
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
24
32
|
def cache_key(*timestamp_names)
|
|
25
33
|
if timestamp_names.present?
|
|
26
34
|
raise ArgumentError, "ContentfulModel::Base models don't support named timestamps."
|