Module: Koudoku::ApplicationHelper

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

Instance Method Summary collapse

Instance Method Details

#plan_interval(plan) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/helpers/koudoku/application_helper.rb', line 8

def plan_interval(plan)
  case plan.interval
  when "month"
    "month"
  when "year"
    "year"
  when "week"
    "week"
  when "6-month"
    "half-year"
  when "3-month"
    "quarter"
  else 
    "month"
  end
end

#plan_price(plan) ⇒ Object



4
5
6
# File 'app/helpers/koudoku/application_helper.rb', line 4

def plan_price(plan)
  "#{number_to_currency(plan.price)}/#{plan_interval(plan)}"
end