New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validations guide #8379
Validations guide #8379
Conversation
| idea to keep your controllers skinny, as it will make your application a | ||
| pleasure to work with in the long run. | ||
|
|
||
| Model-level validations are the best way to ensure that only valid data is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not this a bullet point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it made sense to make the bullet points talk about alternatives to the way that we do it, rather than lumping them all together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@steveklabnik would it be kosher to plug http://github.com/bcardarella/client_side_validations in the guide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm always torn about pinging gems. I've removed one or two in my edits, previously. I think it's best not to show too much favoritism towards any particular gem in the guides.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@steveklabnik figured as much, makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That said, I do know quite a few people that love client_side_validations ;)
|
Squashed and rebased. |
plus: * 80 column formats * replacing the explanation of the dynamic_form gem with the example HTML/CSS that Rails scaffolds generate.
|
|
Here's a few updates to the validations guide. Big things are formatting to 80 columns, and replacing the explanation of the dynamic_form gem with the example HTML/CSS that Rails scaffolds generate.
/cc @fxn @vijaydev