Update customers_controller.rb

This commit is contained in:
2016-05-11 12:23:56 -04:00
parent d8798547b1
commit 74c3535335

View File

@@ -64,9 +64,9 @@ class CustomersController < ApplicationController
flash[:notice] = "Customer updated"
redirect_to @customer
else
flash[:error] = @customer.errors.full_messages.to_sentence if @customer.errors
redirect_to edit_customer_path
end
flash[:error] = @customer.errors.full_messages.to_sentence if @customer.errors
rescue ActiveRecord::RecordNotFound
render_404
end