Class: Downloadable
- Inherits:
-
ProductDownload
- Object
- ActiveRecord::Base
- ProductDownload
- Downloadable
- Defined in:
- app/models/downloadable.rb
Instance Method Summary (collapse)
- - (Object) filename
-
- (Object) validate
if there are errors from the plugin, then add a more meaningful message.
- - (Boolean) zipfile?
Instance Method Details
- (Object) filename
11 12 13 |
# File 'app/models/downloadable.rb', line 11 def filename return end |
- (Object) validate
if there are errors from the plugin, then add a more meaningful message
20 21 22 23 24 25 26 27 |
# File 'app/models/downloadable.rb', line 20 def validate unless .errors.empty? # uncomment this to get rid of the less-than-useful interrim messages # errors.clear errors.add :attachment, "Paperclip returned errors for file '#{}' - check ImageMagick installation or image source file." false end end |
- (Boolean) zipfile?
15 16 17 |
# File 'app/models/downloadable.rb', line 15 def zipfile? == 'application/zip' end |