Hello,

I have a view on which I accept multiple objects of the same model. I
create an array like

@member_list=[]
5.times{
  @member_list<<Member.new
}


user can enter the data for upto 5 members on the same screen. Now how
do I check whether a particular array entry is empty or not. For
example, if user entered data for only 3 members then only 3 objects
should be saved. How do I check for empty object? Also, is there any way
to access validation error for individual object in the array i.e. if
user missed first name in first and date of birth is not valid in 3rd
then how can I get the errors separately for each object validation?

Thanks.

-- 
Posted via http://www.ruby-forum.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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en-US.

Reply via email to