lib/jsonapi/resource.rb in jsonapi-resources-0.0.2 vs lib/jsonapi/resource.rb in jsonapi-resources-0.0.3
- old
+ new
@@ -69,10 +69,10 @@
field_data[:has_many].each do |association_type, values|
replace_has_many_links(association_type, values, context)
end if field_data[:has_many]
end
- def save
+ def save(context)
@object.save!
rescue ActiveRecord::RecordInvalid => e
errors = []
e.record.errors.messages.each do |element|
element[1].each do |message|
\ No newline at end of file