be more clear about blocks not working with accessible_by - closes #130

This commit is contained in:
Ryan Bates
2010-08-30 13:40:31 -07:00
parent a10a38c82f
commit 4fe44af45d
2 changed files with 2 additions and 2 deletions

View File

@@ -216,7 +216,7 @@ module CanCan
def relevant_can_definitions_for_query(action, subject)
relevant_can_definitions(action, subject).each do |can_definition|
if can_definition.only_block?
raise Error, "Cannot determine SQL conditions or joins from block for #{action.inspect} #{subject.inspect}"
raise Error, "The accessible_by call cannot be used with a block 'can' definition. The SQL cannot be determined for #{action.inspect} #{subject.inspect}"
end
end
end