Module: Smerp::Quotation::Engine::ApplicationHelper

Defined in:
app/helpers/smerp/quotation/engine/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#currency(val) ⇒ Object



6
7
8
# File 'app/helpers/smerp/quotation/engine/application_helper.rb', line 6

def currency(val)
  number_to_currency(val, unit: "")
end


14
15
16
# File 'app/helpers/smerp/quotation/engine/application_helper.rb', line 14

def link_add(url, text = "Add")
  link_to text, url, class: "btn btn-primary"
end


18
19
20
# File 'app/helpers/smerp/quotation/engine/application_helper.rb', line 18

def link_back(url, text = "Back")
  link_to text, url, class: "btn btn-secondary"
end


22
23
24
# File 'app/helpers/smerp/quotation/engine/application_helper.rb', line 22

def link_edit(url, text= "Edit")
  link_to text, url, class: "btn btn-warning" 
end

#short_date(dt) ⇒ Object



10
11
12
# File 'app/helpers/smerp/quotation/engine/application_helper.rb', line 10

def short_date(dt)
  dt.strftime("%d-%m-%Y")
end