turning into a funtioning Rails plugin
This commit is contained in:
parent
1034c81763
commit
aaed265c91
|
@ -1,8 +1,7 @@
|
||||||
$:.unshift(File.dirname(__FILE__))
|
|
||||||
require 'cancan/instance_exec'
|
|
||||||
require 'cancan/ability'
|
|
||||||
require 'cancan/controller_additions'
|
|
||||||
|
|
||||||
module CanCan
|
module CanCan
|
||||||
class AccessDenied < StandardError; end
|
class AccessDenied < StandardError; end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
require File.dirname(__FILE__) + '/cancan/instance_exec'
|
||||||
|
require File.dirname(__FILE__) + '/cancan/ability'
|
||||||
|
require File.dirname(__FILE__) + '/cancan/controller_additions'
|
||||||
|
|
|
@ -35,6 +35,8 @@ module CanCan
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class ActionController::Base
|
if defined? ActionController
|
||||||
|
ActionController::Base.class_eval do
|
||||||
include CanCan::ControllerAdditions
|
include CanCan::ControllerAdditions
|
||||||
end
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user