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