Module: Buttafly::ApplicationHelper

Defined in:
app/helpers/buttafly/application_helper.rb

Instance Method Summary collapse

Instance Method Details



4
5
6
7
8
9
10
# File 'app/helpers/buttafly/application_helper.rb', line 4

def nav_link_to(text, path)
  class_name = current_page?(path) ? 'active' : ''

  (:li, class: "#{class_name}") do
    link_to text, path
  end
end

#status_description(status) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/helpers/buttafly/application_helper.rb', line 12

def status_description(status)
  
  case status
  
  when "not_imported"
    "This file is present on the server and a record has been created, but it has not yet been imported."
  when "imported"
    "This file has been imported into the database and its contents converted to json."
  when "processed" 
    "This file's purchase data has successfully generated transactions."
  end
end