lib/snails/mailer.rb in snails-0.5.3 vs lib/snails/mailer.rb in snails-0.5.4
- old
+ new
@@ -220,14 +220,14 @@
if data[:text].blank? && data[:html].blank?
raise ArgumentError, "Either text or html required"
end
if email[:attachments]
- data[:attachment] = email[:attachments].map { |att| { att[:content] }
+ data[:attachment] = email[:attachments].map { |att| att[:content] }
end
resp = RestClient.post(@url, data)
- resp.code == 200 ? [resp.body, data[:to]] : nil
+ return resp.code == 200 ? [resp.body, data[:to]] : nil
end
end
end
\ No newline at end of file