Skip to content

Instantly share code, notes, and snippets.

@tammersaleh
Created July 1, 2010 22:13
Show Gist options
  • Save tammersaleh/460646 to your computer and use it in GitHub Desktop.
Save tammersaleh/460646 to your computer and use it in GitHub Desktop.
scope :none, where("false")
def self.listable_by(user)
return none unless user
where(:creator_id => user.id)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment