app/uploaders/image_uploader.rb
# Add a white list of extensions which are allowed to be uploaded.
# For images you might use something like this:
Add a white list of extensions which are allowed to be uploaded.
For images you might use something like this.
Add a white list of extensions which are allowed to be uploaded . For images you might use something like this .
def extension_white_list
    if model.remote_image_url.present?
      nil 
    else
      %w[jpg jpeg gif png]
    end
  end
def extension_white_list if model . remote_image_url . present? nil else %w[ jpg jpeg gif png ] end end
Add a white list of extensions which are allowed to be uploaded.
Add a white list of extensions which are allowed to be uploaded .
# extension check moved to Image model