lib/better_html/railtie.rb in better_html-2.1.0 vs lib/better_html/railtie.rb in better_html-2.1.1
- old
+ new
@@ -4,11 +4,15 @@
module BetterHtml
class Railtie < Rails::Railtie
initializer "better_html.better_erb.initialization" do
BetterHtml::BetterErb.prepend!
+ end
+ config.after_initialize do
ActiveSupport.on_load(:action_view) do
+ next unless ActionView::Base.respond_to?(:annotate_rendered_view_with_filenames)
+
BetterHtml.config.annotate_rendered_view_with_filenames = ActionView::Base.annotate_rendered_view_with_filenames
end
end
end
end