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
The application I'm working on had an issue with Rails 5.2 and Release 3.0.1 where merit was being initialised once for the API set up, and then consequently not for the actual application set up. Consequently Merit doesn't work using the web infrastructure.
Without the run_once, it does work, but of course you get the warning errors about Merit already being initialised!
If I get chance, I'll try and build an example application, but the fix which works (for me!) would be to change the ActiveSupport.on_load trigger from :action_controller which is used by the API and standard Rails infrastructure to a more specific :action_controller_base
i.e.
ActiveSupport.on_load(:action_controller_base, run_once: true) do
This tightening of action controller loading is detailed a bit more here:
The application I'm working on had an issue with Rails 5.2 and Release 3.0.1 where merit was being initialised once for the API set up, and then consequently not for the actual application set up. Consequently Merit doesn't work using the web infrastructure.
Without the run_once, it does work, but of course you get the warning errors about Merit already being initialised!
If I get chance, I'll try and build an example application, but the fix which works (for me!) would be to change the
ActiveSupport.on_load
trigger from:action_controller
which is used by the API and standard Rails infrastructure to a more specific:action_controller_base
i.e.
This tightening of action controller loading is detailed a bit more here:
rails/rails#28402
The text was updated successfully, but these errors were encountered: