Added images to vehicles
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user