Rails Tutorial - rogeriomiss/toy_app GitHub Wiki

Exercises

  1. (For readers who know CSS) Create a new user, then use your browser’s HTML inspector to determine the CSS id for the text “User was successfully created.” What happens when you refresh your browser? R: When updating, the id notice remains in the code but for the client nothing appears because the message array is empty for this request
  2. What happens if you try to create a user with a name but no email address? R: Creates the user with the null email field as it is not a required field.
  3. What happens if you try create a user with an invalid email address, like “@example.com”? R: Creates the normal user because there is no validation for email.
  4. Destroy each of the users created in the previous exercises. Does Rails display a message by default when a user is destroyed? R: Yes