Class: Presentation
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Presentation
- Defined in:
- app/models/presentation.rb
Constant Summary collapse
- UPLOAD_BASE_DIR =
File.join(Rails.root, "uploaded_presentations")
- INDEX_FILENAME =
"index.html"
- UNPACKED_DIRNAME =
"unpacked"
Instance Method Summary collapse
- #index_path ⇒ Object
- #permalink ⇒ Object
- #to_s ⇒ Object
- #x_accel_redirect_path_to(some_asset) ⇒ Object
Instance Method Details
#index_path ⇒ Object
23 24 25 |
# File 'app/models/presentation.rb', line 23 def index_path File.join(path_without_upload_base_dir, UNPACKED_DIRNAME, INDEX_FILENAME) end |
#permalink ⇒ Object
31 32 33 |
# File 'app/models/presentation.rb', line 31 def permalink friendly_id end |
#to_s ⇒ Object
35 36 37 |
# File 'app/models/presentation.rb', line 35 def to_s title end |
#x_accel_redirect_path_to(some_asset) ⇒ Object
27 28 29 |
# File 'app/models/presentation.rb', line 27 def x_accel_redirect_path_to(some_asset) some_asset.blank? ? index_path : File.join(path_without_upload_base_dir, UNPACKED_DIRNAME, *some_asset) end |