merging with master
This commit is contained in:
@@ -223,6 +223,7 @@ module CanCan
|
||||
elsif sufficient_attribute_check?(action, subject, attribute) && sufficient_condition_check?(action, subject)
|
||||
fully_authorized!(action, subject)
|
||||
end
|
||||
subject
|
||||
end
|
||||
|
||||
def unauthorized_message(action, subject)
|
||||
|
||||
@@ -99,7 +99,7 @@ module CanCan
|
||||
|
||||
def override_scope
|
||||
conditions = @rules.map(&:conditions).compact
|
||||
if conditions.any? { |c| c.kind_of?(ActiveRecord::Relation) }
|
||||
if defined?(ActiveRecord::Relation) && conditions.any? { |c| c.kind_of?(ActiveRecord::Relation) }
|
||||
if conditions.size == 1
|
||||
conditions.first
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user