Class: Para::Library::File
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Para::Library::File
- Defined in:
- app/models/para/library/file.rb
Instance Method Summary collapse
-
#attachment_path ⇒ Object
Return attachment.path or attachment.url depending on the storage backend, allowing ‘openuri’ and ‘roo’ libraries to load easily the file at the right path, on filesystem or othe storage systems, like S3.
Instance Method Details
#attachment_path ⇒ Object
Return attachment.path or attachment.url depending on the storage backend, allowing ‘openuri’ and ‘roo’ libraries to load easily the file at the right path, on filesystem or othe storage systems, like S3.
13 14 15 16 17 18 19 20 |
# File 'app/models/para/library/file.rb', line 13 def return unless case .[:storage] when :filesystem then .path else .url end end |