whichdigital / active-rest-client

ActiveRestClient API Client
https://rubygems.org/gems/active_rest_client
MIT License
386 stars 44 forks source link

In a controller, update_attributes is not supported #109

Open codeblooded opened 8 years ago

codeblooded commented 8 years ago

I'm new to this gem, so pardon me if I'm misunderstanding something. This is totally possible.

I have a User model which is using ActiveRestClient (1.2.0). I'm unable to access the standard model#update_attributes aliased for model#update found in ActiveRecord::Persistence. However, update_attribute is found.

When using the console, I can see that these methods are nil. I feel like ActiveRestClient should support these standard methods, or the documentation should describe why they are not supported and suggest model#save only.

andyjeffries commented 8 years ago

The reason it doesn't it that we've tried to map as few methods in to the namespace as possible - that way they are available for attribute names and mapped method names (because often uses of ActiveRestClient, and Flexirest don't control the API).