Skip to content

Commit 4781853

Browse files
authored
Register template handler after app initializers have set config (#6)
This waits to register the erb handler until after the initializers have run and had a chance to set the configuration. Fixes #1 and alternative to #2
1 parent 3eff384 commit 4781853

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/reactionview/railtie.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Railtie < Rails::Railtie
1616
end
1717
end
1818

19-
initializer "reactionview.configure_erb_handler" do
19+
config.after_initialize do
2020
ActiveSupport.on_load(:action_view) do
2121
if ReActionView.config.intercept_erb
2222
ActionView::Template.register_template_handler :erb, ReActionView::Template::Handlers::Herb

0 commit comments

Comments
 (0)