Class: ReceiptUploader

Inherits:
CarrierWave::Uploader::Base
  • Object
show all
Defined in:
app/uploaders/receipt_uploader.rb

Instance Method Summary collapse

Instance Method Details

#default_urlObject

Provide a default URL as a default if there hasn’t been a file uploaded:



26
27
28
29
30
31
# File 'app/uploaders/receipt_uploader.rb', line 26

def default_url
  # For Rails 3.1+ asset pipeline compatibility:
  asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))

  "/images/fallback/" + [version_name, "default.png"].compact.join('_')
end