Skip to content

Instantly share code, notes, and snippets.

@chinghanho
Created March 19, 2014 05:11
Show Gist options
  • Save chinghanho/9635764 to your computer and use it in GitHub Desktop.
Save chinghanho/9635764 to your computer and use it in GitHub Desktop.
REST
+----------------------------+----------------------+-------------+----------------+----------------+
| | | | | |
| Helper | GET | POST | PUT | DELETE |
| | | | | |
+----------------------------+----------------------+-------------+----------------+----------------+
| | | | | |
| blog_post_path(@post) | /blog/posts/12 | | /blog/posts/12 | /blog/posts/12 |
| | | | | |
+----------------------------+----------------------+-------------+----------------+----------------+
| | | | | |
| blog_posts_path | /blog/posts | /blog/posts | | |
| | | | | |
+----------------------------+----------------------+-------------+----------------+----------------+
| | | | | |
| edit_blog_post_path(@post) | /blog/posts/12/edit | | | |
| | | | | |
+----------------------------+----------------------+-------------+----------------+----------------+
| | | | | |
| new_blog_posts_path | /blog/posts/12/new | | | |
| | | | | |
+----------------------------+----------------------+-------------+----------------+----------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment