Displaying 1 result from an estimated 1 matches for "newdescription".
Did you mean:
getdescription
2006 Jul 02
5
Question about setting field values for a belongs_to model
...ed by scaffold
:
def update
@applicant = Applicant.find(params[:id])
@applicant.attributes=params[:applicant]
if !params[:newskill][:description].blank?
@applicant.skills << Skill.new(params[:newskill])
end
if params[:skill]
params[:skill].each do |skillid, newdescription|
@applicant.skills.find(skillid.to_i).update_attributes(
:description=> newdescription )
#
# The following two lines do not work, but they don''t crash either
# The log file shows update statements to the skill table
# but with the original values, not the...