Re: [Rails] Re: Validation problem
On Sun, Aug 8, 2010 at 7:14 PM, RichardOnRails
<RichardDummyMailbox58407@uscomputergurus.com> wrote:
> It can't be nil. When the form is instantiated
Assuredly, it can be -- a request can be generated without your form
being involved at all.
I'd suggest that it's good practice to handle any (even nil) input value
in a way appropriate to your business logic.
Or not, your call. Don't take my word for it. Write a test and see what
happens when you supply a nil value for that attribute. :-)
FWIW,
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
--
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