Skip to content

Instantly share code, notes, and snippets.

@accuser
Created September 20, 2010 11:40
Show Gist options
  • Save accuser/587771 to your computer and use it in GitHub Desktop.
Save accuser/587771 to your computer and use it in GitHub Desktop.
>> @post = Post.find(BSON::ObjectId("47cc67093475061e3d95369d"))
=> #<Post _id: 47cc67093475061e3d95369d, slug: "life-the-universe-and-everything">
>> post_path(@post)
=> /posts/47cc67093475061e3d95369d
>> post_path(@post, :slug => @post.slug)
=> /posts/47cc67093475061e3d95369d/life-the-universe-and-everything
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment