diff --git a/app/controllers/vehicles_controller.rb b/app/controllers/vehicles_controller.rb index 4989c39..284e034 100644 --- a/app/controllers/vehicles_controller.rb +++ b/app/controllers/vehicles_controller.rb @@ -47,7 +47,7 @@ class VehiclesController < ApplicationController # update a specific vehicle def update @vehicle = Vehicle.find_by_id(params[:id]) - if @vehicle.update_attributes(params) + if @vehicle.update_attributes(params[:vehicle]) flash[:success] = "Vehicle updated" redirect_to @vehicle else