caller is necessary for proper trace in deprecation

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5021 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson
2006-09-05 22:08:33 +00:00
parent 9598176390
commit bd09d9aafb
2 changed files with 2 additions and 2 deletions

View File

@@ -174,7 +174,7 @@ module ActionController #:nodoc:
# deprecated. use <tt>flash.keep</tt> instead
def keep_flash #:doc:
ActiveSupport::Deprecation.warn 'keep_flash is deprecated; use flash.keep instead.'
ActiveSupport::Deprecation.warn 'keep_flash is deprecated; use flash.keep instead.', caller
flash.keep
end
end

View File

@@ -126,7 +126,7 @@ module ActionView
ActiveSupport::Deprecation.warn(
"You've called image_path with a source that doesn't include an extension. " +
"In Rails 2.0, that will not result in .png automatically being appended. " +
"So you should call image_path('#{source}.png') instead"
"So you should call image_path('#{source}.png') instead", caller
)
end