From e9667ad1f0e74694d9df16fa2819a1679ee21e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 21 Oct 2009 21:26:10 -0200 Subject: Make tests run without deprecation warning (just one left). --- actionmailer/lib/action_mailer/deprecated_body.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionmailer/lib/action_mailer/deprecated_body.rb') diff --git a/actionmailer/lib/action_mailer/deprecated_body.rb b/actionmailer/lib/action_mailer/deprecated_body.rb index 982f098bc5..50ff262432 100644 --- a/actionmailer/lib/action_mailer/deprecated_body.rb +++ b/actionmailer/lib/action_mailer/deprecated_body.rb @@ -18,11 +18,11 @@ module ActionMailer def create_parts if String === @body ActiveSupport::Deprecation.warn('body is deprecated. To set the body with a text ' << - 'call render(:text => "body").', caller[7,1]) + 'call render(:text => "body").', caller[0,10]) self.response_body = @body elsif @body.is_a?(Hash) && !@body.empty? ActiveSupport::Deprecation.warn('body is deprecated. To set assigns simply ' << - 'use instance variables', caller[7,1]) + 'use instance variables', caller[0,10]) @body.each { |k, v| instance_variable_set(:"@#{k}", v) } end end -- cgit v1.2.3