Rails Tutorial - rogeriomiss/toy_app GitHub Wiki
Exercises
- (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
- 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.
- 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.
- Destroy each of the users created in the previous exercises. Does Rails display a message by default when a user is destroyed? R: Yes