Update vehicles_controller.rb

This commit is contained in:
2016-04-22 09:26:27 -04:00
parent e350657d89
commit 8b44e5b51b

View File

@@ -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