load the collection instance variable on index action - closes #137

This commit is contained in:
Ryan Bates
2010-09-07 16:25:02 -07:00
parent 158c908d3b
commit 9d915457af
4 changed files with 50 additions and 4 deletions

View File

@@ -221,6 +221,10 @@ module CanCan
attributes
end
def has_block?(action, subject)
relevant_can_definitions(action, subject).any?(&:only_block?)
end
private
def unauthorized_message_keys(action, subject)