diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-03 18:00:27 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-04 11:58:42 -0300 |
commit | 4be859f0fdf7b3059a28d03c279f03f5938efc80 (patch) | |
tree | 8ceb5895aad7b923b05da2067d37f1fffd14bb00 /actionview | |
parent | 34bcbcf35701ca44be559ff391535c0dd865c333 (diff) | |
download | rails-4be859f0fdf7b3059a28d03c279f03f5938efc80.tar.gz rails-4be859f0fdf7b3059a28d03c279f03f5938efc80.tar.bz2 rails-4be859f0fdf7b3059a28d03c279f03f5938efc80.zip |
Change the default template handler from `ERB` to `Raw`.
Files without a template handler in their extension will be rended
using the raw handler instead of ERB.
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/CHANGELOG.md | 7 | ||||
-rw-r--r-- | actionview/lib/action_view/template/handlers.rb | 4 | ||||
-rw-r--r-- | actionview/lib/action_view/template/resolver.rb | 6 |
3 files changed, 9 insertions, 8 deletions
diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md index 72fc6e3c73..ab3cb7eb19 100644 --- a/actionview/CHANGELOG.md +++ b/actionview/CHANGELOG.md @@ -1,3 +1,10 @@ +* Change the default template handler from `ERB` to `Raw`. + + Files without a template handler in their extension will be rended using the raw + handler instead of ERB. + + *Rafael Mendonça França* + * Remove deprecated `AbstractController::Base::parent_prefixes`. *Rafael Mendonça França* diff --git a/actionview/lib/action_view/template/handlers.rb b/actionview/lib/action_view/template/handlers.rb index 9e61ea4225..0105e88a49 100644 --- a/actionview/lib/action_view/template/handlers.rb +++ b/actionview/lib/action_view/template/handlers.rb @@ -7,9 +7,9 @@ module ActionView #:nodoc: autoload :Raw, 'action_view/template/handlers/raw' def self.extended(base) - base.register_default_template_handler :erb, ERB.new + base.register_default_template_handler :raw, Raw.new + base.register_template_handler :erb, ERB.new base.register_template_handler :builder, Builder.new - base.register_template_handler :raw, Raw.new base.register_template_handler :ruby, :source.to_proc end diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb index 29d2e9ca90..b167aecbc7 100644 --- a/actionview/lib/action_view/template/resolver.rb +++ b/actionview/lib/action_view/template/resolver.rb @@ -251,12 +251,6 @@ module ActionView pieces.shift extension = pieces.pop - unless extension - ActiveSupport::Deprecation.warn(<<-MSG.squish) - The file #{path} did not specify a template handler. The default is - currently ERB, but will change to RAW in the future. - MSG - end handler = Template.handler_for_extension(extension) format, variant = pieces.last.split(EXTENSIONS[:variants], 2) if pieces.last |