Module: RetinaRails::CarrierWave

Extended by:
ActiveSupport::Concern
Defined in:
lib/retina_rails/carrierwave.rb

Instance Method Summary collapse

Instance Method Details

#full_filename(for_file) ⇒ Object

Set the correct filename for storage according to the convention (append @2x to filename)



48
49
50
51
52
# File 'lib/retina_rails/carrierwave.rb', line 48

def full_filename(for_file)
  super.tap do |file_name|
    file_name.gsub!('.', '@2x.').gsub!('retina_', '') if version_name.to_s.include?('retina')
  end
end