Module: DownloadsHelper
- Defined in:
- app/helpers/downloads_helper.rb
Instance Method Summary collapse
- #download_file_api_url(download) ⇒ Object
- #download_link(download) ⇒ Object
- #download_tag(download) ⇒ Object
Instance Method Details
#download_file_api_url(download) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'app/helpers/downloads_helper.rb', line 12 def download_file_api_url(download) return nil if download.nil? if sessions_current_project.api_access_token api_v1_api_download_file_url(download, project_token: sessions_current_project.api_access_token) else nil end end |
#download_link(download) ⇒ Object
7 8 9 10 |
# File 'app/helpers/downloads_helper.rb', line 7 def download_link(download) return nil if download.nil? link_to(download_tag(download), download.) end |
#download_tag(download) ⇒ Object
2 3 4 5 |
# File 'app/helpers/downloads_helper.rb', line 2 def download_tag(download) return nil if download.nil? "[#{download.name}] #{download.description}".html_safe end |