Hey all,
I edited this message do to sloppiness and changes.
def student_test
@student = Student.for_test.find(params[:id]) if params[:id]
@student ||= Student.new
run_sequence :testize
end
def test_finalize
Student.transaction do
if (params[:student]) and @student.update_attributes(params[:student])
@student.test!
end
room = Room.new(:room_num => 5)
room.save
book = @student.books
book.id_num = room.id
book.save
end
end
This returns this error message: undefined method `id_num='
Is this because there is more than 1 book record being passed into book?
Any suggestions? Thanks.