Skip to content

Instantly share code, notes, and snippets.

Created March 3, 2012 12:11
Show Gist options
  • Save anonymous/1965834 to your computer and use it in GitHub Desktop.
Save anonymous/1965834 to your computer and use it in GitHub Desktop.
def messages(*params)
folder = params.select { |p| p.to_s == p }[0] || 'messages'
count = params.select { |p| p.to_i == p }[0]
Snooby.build Message, :messages, folder, count
end
def inbox(*params)
messages 'inbox', *params
end
def unread(*params)
messages 'unread', *params
end
def comment_replies(*params)
messages 'comments', *params
end
def post_replies(*params)
messages 'selfreply', *params
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment