diff --git a/app/controllers/koudoku/subscriptions_controller.rb b/app/controllers/koudoku/subscriptions_controller.rb index ebf4dde..88cdae1 100644 --- a/app/controllers/koudoku/subscriptions_controller.rb +++ b/app/controllers/koudoku/subscriptions_controller.rb @@ -53,7 +53,7 @@ def load_subscription @subscription = ::Subscription.where(ownership_attribute => current_owner.id).find_by_id(params[:id]) # also, if cancan methods are available, we should use that to authorize. - if defined?(:can?) + if respond_to?(:can?) return unauthorized unless can? :manage, @subscription end