Module: StripeSaas::ApplicationHelper
- Includes:
- MoneyRails::ActionViewExtension
- Defined in:
- app/helpers/stripe_saas/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#plan_interval(plan) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/helpers/stripe_saas/application_helper.rb', line 9 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
5 6 7 |
# File 'app/helpers/stripe_saas/application_helper.rb', line 5 def plan_price(plan) "#{humanized_money_with_symbol(plan.price, :no_cents => false)}/#{plan_interval(plan)}" end |