Displaying 1 result from an estimated 1 matches for "material_size".
2006 Aug 16
1
update entry in a has_many relation
..._to: person
end
class PersonController < ApplicationController
def update
person = Person.find(@params["id"])
person.name = @params["name"]
first_material = person.materials.find(@params["material_id"])
first_material.size = @params["material_size"]
person.update
end
def add
person = Person.new
person.name = @params["name"]
material = person.materials.find(@params["material_id"])
person.materials.push(material)
person.update
end
def delete_material
person = Person.f...