OSDN Git Service

Regular updates
[twpd/master.git] / rails-routes.md
index 84fc39f..0986efa 100644 (file)
@@ -1,11 +1,14 @@
 ---
 title: Routes
 category: Rails
+layout: 2017/sheet
 ---
 
-## Multiple resources (`resources`)
+## Resources
 
-    resources :books
+### Multiple resources (`resources`)
+
+    resources :photos
 
     # PhotosController:
     # index  =>    GET /photos
@@ -17,9 +20,9 @@ category: Rails
     # delete => DELETE /photos/:id
     #
     # Helpers:
-    # new_book_path
-    # book_path(id)
-    # edit_book_path(id)
+    # new_photo_path
+    # photo_path(id)
+    # edit_photo_path(id)
 
 ### Custom actions