Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
def for_scope(scope, user = GuestUser.new)
case scope
when 'saved'
user.saved_articles.scoped
when 'my'
user.tagged_articles.scoped
else
scoped
end
end
# ????????? scoped or none or something else?
class Guest
def saved_articles
Article.scoped
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment