search for: allergyitem

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

Did you mean: allergy_item
2006 Mar 05
2
Need help understanding Rails magic!
...lergy_list.each do |allergy| allergy.destroy end ###### # now add any new items. the model as a # validate_uniqueness_of condition on description # to avoid duplicate records ###### @allergy_item.update_attributes(params[:allergy_item]) for column in AllergyItem.content_columns selected = @allergy_item.send(column.name) if selected == ''y'' @allergy = Allergy.new @allergy.emrec_id = @emrec.id @allergy.description = column.human_name @allergy.save end end redirect_to :controller =&...