Sha256: 810a94c4f520909d18ad2caca933bf1a1eb3586af7644e2037e5154c2329fbf1

Contents?: true

Size: 652 Bytes

Versions: 13

Compression:

Stored size: 652 Bytes

Contents

module Kaui
  module ObjectHelper

    # Because we don't have access to the account_id, we use the restful_show routes
    def url_for_object(object_id, object_type)
      if object_type == 'ACCOUNT'
        account_path(object_id)
      elsif object_type == 'BUNDLE'
        bundle_path(object_id)
      elsif object_type == 'SUBSCRIPTION'
        subscription_path(object_id)
      elsif object_type == 'INVOICE'
        invoice_path(object_id)
      elsif object_type == 'PAYMENT'
        payment_path(object_id)
      elsif object_type == 'PAYMENT_METHOD'
        payment_method_path(object_id)
      else
        nil
      end
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
kaui-0.16.2 app/helpers/kaui/object_helper.rb
kaui-0.16.1 app/helpers/kaui/object_helper.rb
kaui-0.16.0 app/helpers/kaui/object_helper.rb
kaui-0.15.5 app/helpers/kaui/object_helper.rb
kaui-0.15.4 app/helpers/kaui/object_helper.rb
kaui-0.15.3 app/helpers/kaui/object_helper.rb
kaui-0.15.2 app/helpers/kaui/object_helper.rb
kaui-0.15.1 app/helpers/kaui/object_helper.rb
kaui-0.15.0 app/helpers/kaui/object_helper.rb
kaui-0.14.2 app/helpers/kaui/object_helper.rb
kaui-0.14.1 app/helpers/kaui/object_helper.rb
kaui-0.14.0 app/helpers/kaui/object_helper.rb
kaui-0.12.0 app/helpers/kaui/object_helper.rb