Ruby on Rails Thursday, September 30, 2010

In my view, I do a

<%= render :partial => 'person', :collection =>
@household.people.sort_by(&:birthday) %>

household has a has_many relationship with person, and this works fine
until...

an errant user creates a new person and tries to save without filling
the fields(day, month, and year). After this the birthday field is
created and fails horribly. Is there any way to delete blank records
as part of the validation??


Thanks

Bob <bsm2th@gmail.com>

--
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.

No comments:

Post a Comment