what would be the best way to solve this?
I have a view where I want users to be able to enter the score of a
tennis match. The number of sets to be played is determined from a
column in a database table. Each sports club, when set up, can set the
total number of sets to be played in a match…5, 3, 1…whatever.
This number will determine how many text boxes are displayed for the
user to enter the score. The match model has only one column for score,
so before the score is saved in the database it must be created as
final_score = set_1 + set_2 + set_3 (for a match in which 3 sets must be
I think maybe using virtual attributes is the way to go, but I am not
sure how to implement it.