Skip to content

Instantly share code, notes, and snippets.

@aarondufall
Created July 2, 2012 08:29
Show Gist options
  • Save aarondufall/3031919 to your computer and use it in GitHub Desktop.
Save aarondufall/3031919 to your computer and use it in GitHub Desktop.
severing association
def destroy
@employee = Profile.find(params[:id])
@employee.update_attribute(:company_id, :nil)
if @employee.save
redirect_to root_path, notice: "#{@employee} #{params.inspect}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment