Permalink
Browse files

fixing recipients size check

  • Loading branch information...
1 parent b8ed715 commit 2894757fd52f422f85721a25aaead6791c2a4643 @stephenb committed Apr 16, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sendgrid.rb
View
@@ -125,7 +125,7 @@ def create!(method_name, *parameters)
super
if @sg_substitutions && !@sg_substitutions.empty?
@sg_substitutions.each do |find, replace|
- raise ArgumentError.new("Array for #{find} is not the same size as the recipient array") if replace.size != mail.to.size
+ raise ArgumentError.new("Array for #{find} is not the same size as the recipient array") if replace.size != @sg_recipients.size
end
end
puts "SendGrid X-SMTPAPI: #{sendgrid_json_headers(mail)}" if Object.const_defined?("SENDGRID_DEBUG_OUTPUT") && SENDGRID_DEBUG_OUTPUT

1 comment on commit 2894757

@radar
radar commented on 2894757 Apr 21, 2010

Was just about to fork this and fix it myself and then saw that you'd done this! Thanks!

Please sign in to comment.