lib/lalala/uploaders/image.rb in lalala-4.0.0.dev.94 vs lib/lalala/uploaders/image.rb in lalala-4.0.0.dev.107

- old
+ new

@@ -1,27 +1,15 @@ -class Lalala::Uploaders::Image < CarrierWave::Uploader::Base +class Lalala::Uploaders::Image < Lalala::Uploaders::File 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 + + version :lalala_thumb do + process :resize_to_fill => [100, 100] end end