Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make use of respond_to?

  • Loading branch information...
commit 63e32a3c8d6b78985229e1b2dc550063bde552a7 1 parent d84c661
@rngtng authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/adyen/templates/notification_model.rb
View
4 lib/adyen/templates/notification_model.rb
@@ -43,8 +43,8 @@ def self.log(params)
# For example, merchantReference will be converted to merchant_reference
self.new.tap do |notification|
params.each do |key, value|
- column_name = key.to_s.underscore
- notification.send("#{column_name}=", value) if self.column_names.include?(column_name)
+ setter = "#{key.to_s.underscore}="
+ notification.send(setter, value) if notification.respond_to?(setter)
end
notification.save!
end
Please sign in to comment.
Something went wrong with that request. Please try again.