I am reading ruby on rails tutorial~When I go this~
Weaknesses of This Users Resource
Though good for getting a general overview of Rails, the scaffold Users resource suffers
from a number of severe weaknesses.
• No data validations. Our User model accepts data such as blank names and invalid
email addresses without complaint.
• No authentication. We have no notion signing in or out, and no way to prevent
any user from performing any operation.
• No tests. This isn’t technically true—the scaffolding includes rudimentary tests—
but the generated tests are ugly and inflexible, and they don’t test for data validation,
authentication, or any other custom requirements.
• No layout. There is no consistent site styling or navigation.
• No real understanding. If you understand the scaffold code, you probably shouldn’t
be reading this book.
The Last tips make me laugh~haha~the author is so funny~