lib/hydra-access-controls.rb in hydra-access-controls-5.0.0.pre7 vs lib/hydra-access-controls.rb in hydra-access-controls-5.0.0.pre8

- old
+ new

@@ -23,8 +23,11 @@ # This usually happens within a call to AccessControlsEnforcement#enforce_access_controls but can be # raised manually. class AccessDenied < ::CanCan::AccessDenied; end end -require 'ability' +ActiveSupport.on_load(:after_initialize) do + # Enable the ability class in the local application to load before the ability class provided by hydra-access-controls + require 'ability' +end require 'role_mapper'