Sha256: 70a3e47f060c7c3cdb3e1663050ff683e7be0982020edba7f24c21344da678a5

Contents?: true

Size: 595 Bytes

Versions: 1

Compression:

Stored size: 595 Bytes

Contents

module Koudoku
  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 day).include?(plan.interval) ? plan.interval.delete('-') : 'month'
      I18n.t("koudoku.plan_intervals.#{interval}")
    end

    # returns TRUE if the controller belongs to Koudoku
    # false in all other cases, for convenience when executing filters
    # in the main application
    def koudoku_controller?
      is_a? Koudoku::ApplicationController
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
thumbjive-koudoku-1.5.0 app/helpers/koudoku/application_helper.rb