merging with master

This commit is contained in:
Ryan Bates
2011-03-25 14:32:29 -07:00
5 changed files with 38 additions and 5 deletions
+1
View File
@@ -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