Closed cdmicacc closed 11 years ago
This is actually also a bug in ActiveResource, but exists here too: If you do something like
@user = User.new(params[:user])
but params[:user] is not set (is nil, e.g because the user reloaded the page you POSTed to), you'll get an ugly error coming from reactive_resource:
NoMethodError (undefined method `stringify_keys' for nil:NilClass): app/controllers/users_controller.rb:13:in `new' app/controllers/users_controller.rb:13:in `create'
Given that e.g. ActiveRecord handles this case nicely, I have made a simple change that lets reactive_resource do likewise.
Makes sense, thanks!
This is actually also a bug in ActiveResource, but exists here too: If you do something like
but params[:user] is not set (is nil, e.g because the user reloaded the page you POSTed to), you'll get an ugly error coming from reactive_resource:
Given that e.g. ActiveRecord handles this case nicely, I have made a simple change that lets reactive_resource do likewise.