Module: ImportDatasetsHelper

Defined in:
app/helpers/import_datasets_helper.rb

Instance Method Summary collapse

Instance Method Details

#import_dataset_download(import_dataset) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'app/helpers/import_datasets_helper.rb', line 13

def import_dataset_download(import_dataset)
  return nil if import_dataset.nil?
  link_to(
    '',
    import_dataset.source.url(),
    class: ['circle-button', 'btn-download'],
    download: import_dataset.source_file_name,
    title: import_dataset.source_file_name) 
end


8
9
10
11
# File 'app/helpers/import_datasets_helper.rb', line 8

def import_dataset_link(import_dataset)
  return nil if import_dataset.nil?
  link_to(import_dataset_tag(import_dataset).html_safe, import_dataset.becomes(ImportDataset))
end

#import_dataset_tag(import_dataset) ⇒ Object



3
4
5
6
# File 'app/helpers/import_datasets_helper.rb', line 3

def import_dataset_tag(import_dataset)
  return nil if import_dataset.nil?
  import_dataset.description
end