lib/access-granted/rails/controller_methods.rb in access-granted-1.0.1 vs lib/access-granted/rails/controller_methods.rb in access-granted-1.0.2
- old
+ new
@@ -4,10 +4,10 @@
def current_policy
@current_policy ||= ::AccessPolicy.new(current_user)
end
def self.included(base)
- base.helper_method :can?, :cannot?, :current_policy
+ base.helper_method :can?, :cannot?, :current_policy if base.respond_to? :helper_method
end
def can?(*args)
current_policy.can?(*args)
end