from admin_controller.rb__
def edit
if request.get? #only do this if the user is requesting the page, not submitting the form
@project = Project.find(params[:id])
@senate_committees = Committee.find_by_sql("select name, id from committees$
else
#code here to find the appropriate record you are trying to update
if @record.update_attributes(params[:record])
#success
else
#failure
end
end
end