[Rails] Validate in controller or use Rails validations?
As I prepare to add validations to my application, I am trying to
decide if it would be better to write validation logic in the update/
create controller methods or use Rails' validation methods. In the
former case, I would check the field values provided by the user
before saving to the database and redirect back to the input URL if a
validation fails. The presence of so many built-in validation methods
tells me there must be a good reason to use them. Yet reading through
the documentation I can't be sure what the benefit is. I appreciate
any guidance from the experts in this forum.
Thanks in advance,
Mark
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home