You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently upgraded our Rails app to use Rails 4.2, which brings in ActiveResource 4.1.0.
Under this version, if you use the json request format with Chargify, it does not work. It currently errors and sends back those errors in a format ActiveResource doesn't handle.
For example, calling Chargify::Customer.create yields
NoMethodError: undefined method `each' for "can't be blank":String
from /Users/robertrouse/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activeresource-4.1.0/lib/active_resource/validations.rb:37:in `block in from_hash'
It's expecting an array and is not getting that. I breakpointed in ActiveResource itself and the error hash looks like this.
pry(#<ActiveResource::Errors>)> messages
=> {"customer"=>"can't be blank"}
Using the XML request format works fine, which is why I assume there haven't been reports on things not working.
The text was updated successfully, but these errors were encountered:
Hello,
We recently upgraded our Rails app to use Rails 4.2, which brings in ActiveResource 4.1.0.
Under this version, if you use the json request format with Chargify, it does not work. It currently errors and sends back those errors in a format ActiveResource doesn't handle.
For example, calling Chargify::Customer.create yields
It's expecting an array and is not getting that. I breakpointed in ActiveResource itself and the error hash looks like this.
Using the XML request format works fine, which is why I assume there haven't been reports on things not working.
The text was updated successfully, but these errors were encountered: