lib/lolita/extensions/authorization/proxy.rb in lolita-3.3.9 vs lib/lolita/extensions/authorization/proxy.rb in lolita-3.4.0
- old
+ new
@@ -1,11 +1,12 @@
require "#{File.dirname(__FILE__)}/default_adapter"
require "#{File.dirname(__FILE__)}/cancan_adapter"
+require "#{File.dirname(__FILE__)}/pundit_adapter"
module Lolita
class NoAuthorizationDefinedError < ArgumentError ; end
-
+
module Extensions
module Authorization
class Proxy
attr_accessor :adapter
@@ -29,11 +30,11 @@
end
def current_ability *args
@adapter.current_ability *args
end
-
+
private
def get_adapter
if Lolita.authorization
"Lolita::Extensions::Authorization::#{Lolita.authorization}Adapter".constantize.new @context, @options
@@ -43,6 +44,6 @@
end
end
end
end
-end
\ No newline at end of file
+end