We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4277a86 commit 499a200Copy full SHA for 499a200
lib/json_api_client/resource.rb
@@ -365,11 +365,6 @@ def initialize(params = {})
365
366
setup_default_properties
367
368
- self.class.associations.each do |association|
369
- if params.has_key?(association.attr_name.to_s)
370
- set_attribute(association.attr_name, params[association.attr_name.to_s])
371
- end
372
373
self.request_params = self.class.request_params_class.new(self.class)
374
end
375
test/unit/resource_test.rb
@@ -88,6 +88,7 @@ def test_associations_as_params
88
assert_equal(article.foo, 'bar')
89
assert_equal({'type' => 'authors', 'id' => 1}, article.relationships.author)
90
assert article.relationships.attribute_changed?(:author)
91
+ refute article.attributes.has_key?(:author)
92
93
94
def test_default_params_overrideable
0 commit comments