app/uploaders/picture_uploader.rb
def store_dir
    if Rails.env.production?
      "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
    else
      "test/uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
    end
  end
# Override the directory where uploaded files will be stored.
# This is a sensible default for uploaders that are meant to be mounted:
Override the directory where uploaded files will be stored.
This is a sensible default for uploaders that are meant to be mounted.
Override the directory where uploaded files will be stored . This is a sensible default for uploaders that are meant to be mounted .
def store_dir
    if Rails.env.production?
      "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
    else
      "test/uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
    end
  end
def store_dir if Rails . env . production? "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" else "test/uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end end
Override the directory where uploaded files will be stored.
Override the directory where uploaded files will be stored .