Skip to content

Commit

Permalink
Merge branch 'f/deployment-api' of https://github.com/fmanimashaun/bo…
Browse files Browse the repository at this point in the history
…ok-car-api into f/deployment-api
  • Loading branch information
Estete9 committed Feb 24, 2024
2 parents 52c1512 + 168bcf0 commit 77c46d8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/models/car.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ class Car < ApplicationRecord
validate :car_image_attached

def set_image_url
if car_image.attached?
self.image_url = Rails.root.join("public", Rails.application.config.active_storage.paths['car_image'].call(car_image)).to_s
end
self.image_url = Rails.root.join("public", car_image.blob.key).to_s
end


Expand Down

0 comments on commit 77c46d8

Please sign in to comment.