In there a way in Ember.js
with routing to basically create an alias route that simply goes to the same place as another route? I have the following defined:
this.resource("accounts", { path: "/accounts/:account_id" }, function() {
this.route("credit", { path: "/credits/:credit_id" });
this.route("debit", { path: "/debits/:debit_id" });
this.route("refund", { path: "/refunds/:refund_id" });
this.route("hold", { path: "/holds/:hold_id" });
});
An example working route looks like:
/accounts/foo-bar-account-id/credits/foo-bar-credit-id
I need an alias routes though for each, without account, that should work in the form of:
/credits/:credit_id
/debits/:debit_id
/refunds/:refund_id
/holds/:hold_id
Can I do something as simple as?
this.route("accounts.credit", { path: "/credits/:credit_id" });
this.route("accounts.debit", { path: "/debits/:debit_id" });
this.route("accounts.refund", { path: "/refunds/:refund_id" });
this.route("accounts.hold", { path: "/holds/:hold_id" });
Thanks.