Added images to vehicles
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / scan_js (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run

This commit is contained in:
2024-08-20 20:26:06 +02:00
parent 132ea2c51d
commit f50bf2fa5f
5 changed files with 25 additions and 4 deletions

View File

@@ -1,8 +1,8 @@
class VehiclesController < ApplicationController
before_action :set_vehicle, only: %i[ show edit update destroy ]
skip_before_action :authenticate
#has_many_attached :images
# has_many_attached :images
# GET /vehicles or /vehicles.json
def index
@@ -68,6 +68,6 @@ class VehiclesController < ApplicationController
# Only allow a list of trusted parameters through.
def vehicle_params
params.require(:vehicle).permit(:vehicle_type, :car_brand, :model, :model_year, :fuel_type, :power_ps, :power_kw, :registered, :license_plate, :color, :note)
params.require(:vehicle).permit(:vehicle_type, :car_brand, :model, :model_year, :fuel_type, :power_ps, :power_kw, :registered, :license_plate, :color, :note, images: [])
end
end