Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save leofrozenyogurt/688c14863612a8abf7e9c3e00ea1429d to your computer and use it in GitHub Desktop.
Save leofrozenyogurt/688c14863612a8abf7e9c3e00ea1429d to your computer and use it in GitHub Desktop.
[2] pry(#<PaymentsController>)> @donation.errors
=> #<ActiveResource::Errors:0x007f9dfe660550
@base=
#<Donation:0x007f9e03839750
@attributes=
{"persona_id"=>6528300,
"splits"=>
[#<Donation::Split:0x007f9e01e5ff78
@attributes={"amount_in_cents"=>100, "fund_id"=>49574},
@persisted=false,
@prefix_options={}>],
"donation_type_id"=>1,
"source_id"=>45287},
@errors=#<ActiveResource::Errors:0x007f9dfe660550 ...>,
@persisted=false,
@prefix_options={},
@remote_errors=#<ActiveResource::ResourceInvalid: Failed. Response code = 422. Response message = Unprocessable Entity.>,
@validation_context=nil>,
@messages={:base=>["Source can't be blank"], :donation_type_id=>["can't be blank"], :splits=>["can't be blank"]}>
[3] pry(#<PaymentsController>)> @donation.splits
=> [#<Donation::Split:0x007f9e01e5ff78 @attributes={"amount_in_cents"=>100, "fund_id"=>49574}, @persisted=false, @prefix_options={}>]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment