Skip to content

Commit

Permalink
Merge pull request #208 from Rabsztok/master
Browse files Browse the repository at this point in the history
Allow use of `detail` next to `title` attribute on error parsing. Issue #196
  • Loading branch information
chingor13 authored Sep 13, 2016
2 parents 2275617 + 98da379 commit d8f1d46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/json_api_client/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,9 @@ def save
if last_result_set.has_errors?
last_result_set.errors.each do |error|
if error.source_parameter
errors.add(error.source_parameter, error.title)
errors.add(error.source_parameter, error.title || error.detail)
else
errors.add(:base, error.title)
errors.add(:base, error.title || error.detail)
end
end
false
Expand Down

0 comments on commit d8f1d46

Please sign in to comment.