I have a form which contain a student names and their attendance.
For each student name there is a text box to input attendance.I want
to create a connection between the 'name' and it's attendance. I think
I should merge the student name and the attendance.But could not
achieve it as yet.
Can nyone give me an idea how to do this.
how about this
[name, attendence].join(' ')
split_name_and_attendence = name_attendence.split(' ')
self.name = split_name_and_attendence.first
self.attendence = split_name_and_attendence.last
'name and attendece not valid'
above i am only checking the presence of name_attendence but not its
format or any other stuff that you might have to add in your model or