diff --git a/app/models/car.rb b/app/models/car.rb index 718e9a2..33b6db2 100644 --- a/app/models/car.rb +++ b/app/models/car.rb @@ -9,11 +9,10 @@ class Car < ApplicationRecord validates :description, presence: true, length: { minimum: 10, maximum: 255 } validate :car_image_attached - def set_image_url - self.image_url = Rails.root.join("public", car_image.blob.key).to_s + def set_image_url + self.image_url = Rails.root.join('public', car_image.blob.key).to_s end - private def car_image_attached