To Lecture Notes

IT 232 -- 9/30/15

Review Question

  1. Suppose that the primary model is User and the secondary model is Photo. Convert these resource based routes to nested routes:
    Current View Target View Helper Method Answers
    index show photo_path(photo) user_photo_path(@user, photo)
    index edit edit_photo_path(photo) edit_user_photo_path(@user, photo)
    index new new_photo_path new_user_photo_path(@user)
    show edit photo_path(@photo) edit_user_photo_path(@user, @photo)
    show index photo_path(@photo) user_photos_path(@user)
    edit show photo_path(@photo) user_photo_path(@user, @photo)

    Use the RESTful Routes tables to help you.

Regular Expressions

Some Old Fashioned HTTP

Starting Rails Server on a Different Port

HTTP GET vs. POST

Representational State Transfer

Adding an Action to a Scaffold Based Project

Rendering in Web Service Format

Forms and Controls

Rails Relationships