mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 08:54:23 -05:00
Update vehicles_controller.rb
This commit is contained in:
@@ -33,6 +33,7 @@ class VehiclesController < ApplicationController
|
||||
def create
|
||||
@vehicle = Vehicle.new(params[:vehicle])
|
||||
@vehicle.save!
|
||||
flash[:notice] = "New Vehicle Created"
|
||||
redirect_to @vehicle
|
||||
end
|
||||
|
||||
@@ -73,9 +74,9 @@ class VehiclesController < ApplicationController
|
||||
v = Vehicle.find_by_id(params[:id])
|
||||
if v?
|
||||
v.destroy
|
||||
flash.now[:notice] = "Vehicle deleted successfully"
|
||||
flash[:notice] = "Vehicle deleted successfully"
|
||||
else
|
||||
flash.now[:error] = "No Vehicle Found"
|
||||
flash[:error] = "No Vehicle Found"
|
||||
end
|
||||
redirect_to action: :index
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user