search for: edit_person

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

2006 Apr 18
4
how would you take the duplication out of this?
..._company @company = Company.find(params[:id]) if request.post? and @company.update_attributes(params[:company]) flash[:notice] = ''Company was successfully edited.'' redirect_to :action => ''show'', :id => @company end end def edit_person @person = Person.find(params[:id]) if request.post? and @person.update_attributes(params[:person]) flash[:notice] = ''Person was successfully edited.'' redirect_to :action => ''show'', :id => @person end end it really bugs me th...