-
-
Save keithpitt/794583 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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