How can i add multiple records to a single table, through single form

Hi, i have just started with rails. I am making a attendance web app. I want to insert student attendance into attendances table and unable to do it as the form just inserts only last entry of the form. Student table and Attendances table have associations(has_many,belongs_to,). Please let me know how the form should be and controller api should look like.

Hi Elizabeth, thanks for the reply. I want to take attendance for entire class of students not just one person.

I am using Rails 4.2.1 and ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]

you can use sunil_custom_field gem.