Module: Kaui::ObjectHelper
- Defined in:
- app/helpers/kaui/object_helper.rb
Instance Method Summary collapse
-
#url_for_object(object_id, object_type) ⇒ Object
Because we don’t have access to the account_id, we use the restful_show routes.
Instance Method Details
#url_for_object(object_id, object_type) ⇒ Object
Because we don’t have access to the account_id, we use the restful_show routes
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/helpers/kaui/object_helper.rb', line 5 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 |