Skip to content

Instantly share code, notes, and snippets.

@keithpitt
Forked from dangalipo/gist:794581
Created January 25, 2011 06:53
Show Gist options
  • Save keithpitt/794583 to your computer and use it in GitHub Desktop.
Save keithpitt/794583 to your computer and use it in GitHub Desktop.
def merge_suppliers
@supplier_from = Supplier.find(params[:id])
begin
@supplier_to = Supplier.find(params[:supplier_id])
rescue ActiveRecord::RecordNotFound
flash[:error] = "#{t('object.supplier')} #{t('messages.not_found')}"
return redirect_to(manage_supplier_path(@supplier_from.id))
end
render :merge_suppliers
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment