Skip to content

Instantly share code, notes, and snippets.

@chrismear
Created August 17, 2012 11:41
Show Gist options
  • Save chrismear/3378221 to your computer and use it in GitHub Desktop.
Save chrismear/3378221 to your computer and use it in GitHub Desktop.
def can_view?(list)
return true if list.user.id == current_user.id
return false if list.list_type == List::PRIVATE
return true
end
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