Skip to content

Commit

Permalink
Merge pull request #843 from Edouard-chin/lazy-load-hooks
Browse files Browse the repository at this point in the history
Use lazy load hooks to hook on ActionController::Base
  • Loading branch information
scarroll32 committed Nov 3, 2017
2 parents febc601 + 11cde28 commit b805011
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ransack.rb
Expand Up @@ -26,4 +26,6 @@ class UntraversableAssociationError < StandardError; end;

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

0 comments on commit b805011

Please sign in to comment.