giraffesoft-classy_resources 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/classy_resources/sequel.rb +1 -1
- data/test/fixtures/sequel_test_app.rb +1 -0
- data/test/sequel_test.rb +2 -2
- metadata +1 -1
data/VERSION.yml
CHANGED
@@ -13,7 +13,7 @@ module ClassyResources
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def create_nested_object(resource, object_params, parent)
|
16
|
-
c =
|
16
|
+
c = class_for(resource).new(object_params)
|
17
17
|
load_parent_object(parent).send(:"add_#{resource.to_s.singularize}", c)
|
18
18
|
end
|
19
19
|
|
data/test/sequel_test.rb
CHANGED
@@ -77,8 +77,8 @@ class SequelTest < Test::Unit::TestCase
|
|
77
77
|
context "on GET to /users/id/comments" do
|
78
78
|
setup do
|
79
79
|
@user = create_user
|
80
|
-
2.times { @user.add_subscription(
|
81
|
-
2.times { create_subscription }
|
80
|
+
2.times { @user.add_subscription(Subscription.new(hash_for_subscription)) }
|
81
|
+
2.times { create_subscription(:user_id => 9) }
|
82
82
|
get "/users/#{@user.id}/subscriptions.xml"
|
83
83
|
end
|
84
84
|
|