restful_resource 0.8.19 → 0.8.20

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: ee2cd0cbeb47f73c4698b263fdb12f0fd9f8ba31
4
- data.tar.gz: c7bee8e65111360e37d50b6e1a930a8ffa0c07ba
3
+ metadata.gz: e331eba07a0e8c7a74b10add8adb9b76b913133f
4
+ data.tar.gz: 5a9ec4b285423351c9e9495c655e62e9b9c3abdf
5
5
  SHA512:
6
- metadata.gz: b600cd921813075123dc916f63c0a431e231e8275a7bc0c0763b3a6e2d571535c863267db73d40c9b5318a9d971a1c7540be7025d6232828f947ebdd7dfb9188
7
- data.tar.gz: 153e70baf50ea3302a9f4bd5ac5031e690167b3752ea276175e5a434b0d3edafd5b27065490ede7c9dd42ca298dbff48105ea9b5f9db3050555439bee4830462
6
+ metadata.gz: eae107d9e38d8cf10ffcf9ca9895ceefe1d34bcc1e28b41ba55bffa154b8b323102fbb1e1a34edfcffa6d005cc13be0ec527af73a7f52bf94d9b3fda0b28e6e0
7
+ data.tar.gz: b7f374115802d5259c635c0f4d3e65b05fe681d701d28da534da6aa3b40e76a2c71052022de34c526abe4958907d9eadad2211ace3e0ac682d5e6e417827ef16
@@ -7,7 +7,7 @@ module RestfulResource
7
7
 
8
8
  self.send(:define_method, nested_resource_type) do
9
9
  klass = klass_name.safe_constantize
10
- klass = RestfulResource::OpenObject if (klass.nil? || (klass.superclass != RestfulResource::Base))
10
+ klass = RestfulResource::OpenObject if (klass.nil? || !(klass < RestfulResource::Base))
11
11
  @inner_object.send(nested_resource_type).map { |obj| klass.new(obj) }
12
12
  end
13
13
  end
@@ -19,7 +19,7 @@ module RestfulResource
19
19
 
20
20
  self.send(:define_method, nested_resource_type) do
21
21
  klass = klass_name.safe_constantize
22
- klass = RestfulResource::OpenObject if (klass.nil? || (klass.superclass != RestfulResource::Base))
22
+ klass = RestfulResource::OpenObject if (klass.nil? || !(klass < RestfulResource::Base))
23
23
  nested_resource = @inner_object.send(nested_resource_type)
24
24
  return nil if nested_resource.nil?
25
25
  klass.new(@inner_object.send(nested_resource_type))
@@ -1,3 +1,3 @@
1
1
  module RestfulResource
2
- VERSION = "0.8.19"
2
+ VERSION = "0.8.20"
3
3
  end
data/spec/fixtures.rb CHANGED
@@ -29,7 +29,7 @@ class TestB < BaseB
29
29
  end
30
30
 
31
31
  module ComplicatedModule
32
- class Parent < RestfulResource::Base
32
+ class Parent < BaseA
33
33
  resource_path "parent"
34
34
  has_many :children
35
35
 
@@ -38,7 +38,7 @@ module ComplicatedModule
38
38
  end
39
39
  end
40
40
 
41
- class Child < RestfulResource::Base
41
+ class Child < BaseA
42
42
  resource_path 'parents/:parent_id/children'
43
43
  has_one :parent
44
44
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restful_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.19
4
+ version: 0.8.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Santoro