Created
May 15, 2014 15:31
-
-
Save reboryan/efa56f2c4d86f9cc1d1a to your computer and use it in GitHub Desktop.
Revisions
-
reboryan created this gist
May 15, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ #IN THE CONTROLLER put '/update_blog_post' do #do stuff to update record end delete '/delete_blog_post' do #do stuff to delete record end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ <!--TO ALLOW PUT REQUEST:--> <form method="post" action="/update_blog_post"> <input type="hidden" name="_method" value="put"> <input type="text" name="title" value="title"> <input type="text" name="body" value="body"> <input type="submit" name="submit_edit"> </form> <!--TO ALLOW DELETE REQUEST:--> <form method="post" action="/delete_blog_post"> <input type="hidden" name="_method" value="delete"> <input type="text" name="title" value="title"> <input type="text" name="body" value="body"> <input type="submit" name="submit_edit"> </form>