Sha256: b8564e0d74fc97ea4fed477df32c20ad8c39baf9cd973e8d3637ab141f866492
Contents?: true
Size: 596 Bytes
Versions: 5
Compression:
Stored size: 596 Bytes
Contents
module Tellimus module ApplicationHelper def plan_price(plan) "#{number_to_currency(plan.price)}/#{plan_interval(plan)}" end def plan_interval(plan) interval = %w(month year week 6-month 3-month).include?(plan.interval) ? plan.interval.delete('-') : 'month' I18n.t("tellimus.plan_intervals.#{interval}") end # returns TRUE if the controller belongs to Tellimus # false in all other cases, for convenience when executing filters # in the main application def tellimus_controller? is_a? Tellimus::ApplicationController end end end
Version data entries
5 entries across 5 versions & 1 rubygems