Sha256: 80cc5cacf26d8aa39ab3a5e324a3556e2d88be174aff94db1fb16f1fa5197592
Contents?: true
Size: 590 Bytes
Versions: 7
Compression:
Stored size: 590 Bytes
Contents
class Lalala::Uploaders::Image < CarrierWave::Uploader::Base include CarrierWave::MiniMagick include Sprockets::Helpers::RailsHelper include Sprockets::Helpers::IsolatedHelper def store_dir if Rails.env.production? or Rails.env.staging? "#{model.class.to_s.underscore}/#{model.id}" else "uploads/#{model.class.to_s.underscore}/#{model.id}" end end def url(*) if Rails.env.production? or Rails.env.staging? File.join("/storage/assets", super) else super end end def extension_white_list %w(jpg jpeg gif png) end end
Version data entries
7 entries across 7 versions & 1 rubygems