Module: DownloadsHelper

Defined in:
app/helpers/downloads_helper.rb

Instance Method Summary collapse

Instance Method Details

#fileicon(download) ⇒ Object



2
3
4
5
6
7
8
# File 'app/helpers/downloads_helper.rb', line 2

def fileicon(download)
  if Download::ICONS.include?(download.file.file_ext)
    image_tag("#{download.file.file_ext}.png")
  else 
    image_tag('page_white.png')
  end
end


10
11
12
# File 'app/helpers/downloads_helper.rb', line 10

def filelink(download)
  "onclick=\"window.location.href='#{download.file.url}';\" ".html_safe
end