Update customers_controller.rb

This commit is contained in:
2016-05-06 06:56:53 -04:00
parent b217126316
commit 29ea58db36

View File

@@ -47,6 +47,7 @@ class CustomersController < ApplicationController
# update a specific customer # update a specific customer
def update def update
@customers = Customer.all.order(:name)
@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[:success] = "Customer updated"