Use lazy load hooks to hook on ActionController::Base
- Calling directly `ActionController::Base` affects the initialization process (one of them being one that controls ActionController [configuration](aa6bcbbac8/actionpack/lib/action_controller/railtie.rb (L53-L67)
))
- As a result setting configuration inside an initializer (such as the asset_host), won't have any effect
This commit is contained in:
parent
febc601aff
commit
11cde28f7a
|
@ -26,4 +26,6 @@ require 'ransack/translate'
|
|||
|
||||
Ransack::Adapters.object_mapper.require_adapter
|
||||
|
||||
ActionController::Base.helper Ransack::Helpers::FormHelper
|
||||
ActiveSupport.on_load(:action_controller) do
|
||||
ActionController::Base.helper Ransack::Helpers::FormHelper
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue