lib/access-granted.rb in access-granted-0.1.1 vs lib/access-granted.rb in access-granted-0.2
- old
+ new
@@ -1,9 +1,15 @@
-require "access-granted/version"
require "access-granted/exceptions"
require "access-granted/policy"
require "access-granted/permission"
require "access-granted/role"
+require 'access-granted/rails/controller_methods'
module AccessGranted
+end
+
+if defined? ActionController::Base
+ ActionController::Base.class_eval do
+ include AccessGranted::Rails::ControllerMethods
+ end
end