You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the middleware directly in application_controller.rb and all helpers are included as usual. This isn't super ideal for us - I like keeping environment specific code in config/environments. I may not be able to do this due to load order issues, and if thats the case, then this should be closed.
This issue has been automatically marked as stale because it has not been commented on for at least
three months.
The resources of the Rails team are limited, and so we are asking for your help.
If you can still reproduce this error on the 4-2-stable, 4-1-stable branches or on master,
please reply with all of the information you have about it in order to keep the issue open.
It happens because when you call ApplicationController in a initializer it load the ActionController before action_view helpers and hooked. Yeah, it is not possible to use this right now.
Given a blank rails app fresh from
rails new
, add two helper methods:Now, add a middleware to the ApplicationController in an environment's config file. For example:
FooHelper will no longer be included by default in ActionView::Base.
Present on 4.1 and 4.2, unsure of other versions. A blank app that reproduces this is here.
The text was updated successfully, but these errors were encountered: