lib/braintree_rails/persistence.rb in braintree-rails-1.0.0 vs lib/braintree_rails/persistence.rb in braintree-rails-1.1.0
- old
+ new
@@ -113,11 +113,10 @@
if result.respond_to?(:success?) && !result.success?
add_errors(extract_errors(result))
false
else
new_record = result.respond_to?(self.class.braintree_model_name) ? result.send(self.class.braintree_model_name) : result
- assign_attributes(extract_values(new_record))
- self.persisted = true
+ init(new_record)
end
end
end
def extract_errors(result)