Created
August 17, 2012 11:41
-
-
Save chrismear/3378221 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def can_view?(list) | |
return true if list.user.id == current_user.id | |
return false if list.list_type == List::PRIVATE | |
return true | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def can_view?(list) | |
(list.user == current_user) || (list.list_type != List::PRIVATE) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment