Added images to vehicles
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
class Vehicle < ApplicationRecord
|
||||
enum vehicle_type: { car: 0, truck: 1, motorcycle: 2, van: 3}
|
||||
has_many_attached :images do |attachable|
|
||||
attachable.variant :thumb, resize_to_limit: [ 100, 100 ]
|
||||
attachable.variant :medium, resize_to_limit: [ 600, 600 ]
|
||||
attachable.variant :big, resize_to_limit: [ 1000, 1000 ]
|
||||
attachable.variant :hugh, resize_to_limit: [ 1920, 1920 ]
|
||||
end
|
||||
|
||||
enum vehicle_type: { car: 0, truck: 1, motorcycle: 2, van: 3 }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user