Module: Koudoku::ApplicationHelper
- Defined in:
- app/helpers/koudoku/application_helper.rb
Instance Method Summary collapse
-
#koudoku_controller? ⇒ Boolean
returns TRUE if the controller belongs to Koudoku false in all other cases, for convenience when executing filters in the main application.
- #plan_interval(plan) ⇒ Object
- #plan_price(plan) ⇒ Object
Instance Method Details
#koudoku_controller? ⇒ Boolean
returns TRUE if the controller belongs to Koudoku false in all other cases, for convenience when executing filters in the main application
28 29 30 |
# File 'app/helpers/koudoku/application_helper.rb', line 28 def koudoku_controller? is_a? Koudoku::ApplicationController end |
#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 |