11 lines
400 B
Ruby
11 lines
400 B
Ruby
class Vehicle < ApplicationRecord
|
|
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
|