lib/access-granted.rb in access-granted-1.2.0 vs lib/access-granted.rb in access-granted-1.3.0
- old
+ new
@@ -1,21 +1,11 @@
require "access-granted/exceptions"
require "access-granted/policy"
require "access-granted/permission"
require "access-granted/role"
require "access-granted/rails/controller_methods"
+require "access-granted/railtie" if defined?(Rails)
module AccessGranted
end
-if defined? ActionController::Base
- ActionController::Base.class_eval do
- include AccessGranted::Rails::ControllerMethods
- end
-end
-
-if defined? ActionController::API
- ActionController::API.class_eval do
- include AccessGranted::Rails::ControllerMethods
- end
-end