mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-09 01:14:23 -05:00
Update customers_controller.rb
This commit is contained in:
@@ -26,7 +26,7 @@ class CustomersController < ApplicationController
|
||||
end
|
||||
|
||||
def create
|
||||
|
||||
flash[:error] @customer.errors.full_messages.to_sentence if @customer.errors
|
||||
end
|
||||
|
||||
# display a specific customer
|
||||
@@ -49,11 +49,12 @@ class CustomersController < ApplicationController
|
||||
def update
|
||||
@customer = Customer.find_by_id(params[:id])
|
||||
if @customer.update_attributes(params[:customer])
|
||||
flash[:success] = "Customer updated"
|
||||
flash[:notice] = "Customer updated"
|
||||
redirect_to @customer
|
||||
else
|
||||
render :edit
|
||||
end
|
||||
flash[:error] @customer.errors.full_messages.to_sentence if @customer.errors
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
||||
Reference in New Issue
Block a user