diff options
author | Aaron Patterson <tenderlove@github.com> | 2019-02-06 18:08:36 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-06 18:08:36 -0800 |
commit | 973b62dcddd2db45047d32321e6887c841fc5ccf (patch) | |
tree | 791524f548ebe2b18b4cb7c704962a7a55150e6e /actionview/lib/action_view/railtie.rb | |
parent | d0037daa3738ac754781ce5e55778a2cf9d3d2f7 (diff) | |
parent | 570bcdaa65987ac2f5cc84fdf83678cd5c0bb7d8 (diff) | |
download | rails-973b62dcddd2db45047d32321e6887c841fc5ccf.tar.gz rails-973b62dcddd2db45047d32321e6887c841fc5ccf.tar.bz2 rails-973b62dcddd2db45047d32321e6887c841fc5ccf.zip |
Merge pull request #35036 from rails/av-base-subclass
Move compiled ERB to an AV::Base subclass
Diffstat (limited to 'actionview/lib/action_view/railtie.rb')
-rw-r--r-- | actionview/lib/action_view/railtie.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/actionview/lib/action_view/railtie.rb b/actionview/lib/action_view/railtie.rb index 12d06bf376..a25e1d3d02 100644 --- a/actionview/lib/action_view/railtie.rb +++ b/actionview/lib/action_view/railtie.rb @@ -6,11 +6,13 @@ require "rails" module ActionView # = Action View Railtie class Railtie < Rails::Engine # :nodoc: + NULL_OPTION = Object.new + config.action_view = ActiveSupport::OrderedOptions.new config.action_view.embed_authenticity_token_in_remote_forms = nil config.action_view.debug_missing_translation = true config.action_view.default_enforce_utf8 = nil - config.action_view.finalize_compiled_template_methods = true + config.action_view.finalize_compiled_template_methods = NULL_OPTION config.eager_load_namespaces << ActionView @@ -48,8 +50,11 @@ module ActionView initializer "action_view.finalize_compiled_template_methods" do |app| ActiveSupport.on_load(:action_view) do - ActionView::Template.finalize_compiled_template_methods = - app.config.action_view.delete(:finalize_compiled_template_methods) + option = app.config.action_view.delete(:finalize_compiled_template_methods) + + if option != NULL_OPTION + ActiveSupport::Deprecation.warn "action_view.finalize_compiled_template_methods is deprecated and has no effect" + end end end |