mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-05 16:24:21 +01:00
8 lines
245 B
Ruby
8 lines
245 B
Ruby
module ImageValidatorConcern
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
validates :attachment, file_size: { maximum: Rails.application.secrets.max_image_size ? Rails.application.secrets.max_image_size.to_i : 2.megabytes.to_i }
|
|
end
|
|
end
|