search for: self_evaluation_answ

Displaying 1 result from an estimated 1 matches for "self_evaluation_answ".

Did you mean: self_evaluation_answer
2006 Apr 11
6
Reduce Number of Queries When Using ActiveRecord
I have a controller method called update_all that grabs parameters for about 30 form fields and saves them to the database. My current code looks to see if there is a string in params[] for each form field (two fields for each SelfEvaluationItem) and saves the updated self_evaluation_answer if a string is available. Since this is iterated code, I am almost certain that this generates 30 or so SQL queries. Is there a way to build up all of the self_evaluation_answers into a larger unit (model array?) and then save them all at once? The goal of course would be to reduce the number...