diff options
Diffstat (limited to 'actionpack/lib/action_view/template/resolver.rb')
-rw-r--r-- | actionpack/lib/action_view/template/resolver.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb index 25c6fd4aa8..32a9152707 100644 --- a/actionpack/lib/action_view/template/resolver.rb +++ b/actionpack/lib/action_view/template/resolver.rb @@ -232,8 +232,14 @@ module ActionView def extract_handler_and_format(path, default_formats) pieces = File.basename(path).split(".") pieces.shift + extension = pieces.pop - ActiveSupport::Deprecation.warn "The file #{path} did not specify a template handler. The default is currently ERB, but will change to RAW in the future." unless extension + unless extension + message = "The file #{path} did not specify a template handler. The default is currently ERB, " / + "but will change to RAW in the future." + ActiveSupport::Deprecation.warn(message, caller) + end + handler = Template.handler_for_extension(extension) format = pieces.last && Template::Types[pieces.last] [handler, format] |