Skip to content

Commit 57285c1

Browse files
committed
Rearrange routes due to bug in Ember 2.7.0
emberjs/ember.js#13921
1 parent 07ed8c7 commit 57285c1

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

app/router.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,23 @@ Ember.Route.reopen({
4545
});
4646

4747
Router.map(function() {
48+
// Workaround: https://github.com/emberjs/ember.js/issues/13921
49+
// wildcard routes need to be at the top
50+
this.route("dashboard", function() {});
51+
this.route("bulletin/sunday", { path: "/sunday" }, function() {});
52+
this.route("not-found", { path: "*path" });
53+
// END WORKAROUND 13921
54+
4855
this.route("group", { path: ":group_slug" }, function() {
4956
this.route("index", { path: "/" }, function() {});
5057
this.route("edit", function() {});
5158

59+
this.route("bulletins", { resetNamespace: true, path: "bulletins" }, function() {
60+
this.route("new", function() {
61+
this.route("announcements");
62+
});
63+
});
64+
5265
this.route("bulletin", { resetNamespace: true, path: "bulletins/:bulletin_id" }, function() {
5366
this.route("edit");
5467
});
@@ -65,15 +78,6 @@ Router.map(function() {
6578
this.route('posts', { resetNamespace: true, path: 'posts' }, function() {
6679
this.route('new', function() {});
6780
});
68-
69-
this.route("bulletins", { resetNamespace: true, path: "bulletins" }, function() {
70-
this.route("new", function() {
71-
this.route("announcements");
72-
});
73-
});
74-
});
75-
76-
this.route("bulletin/sunday", { path: "/sunday" }, function() {
7781
});
7882

7983
this.route("login");
@@ -82,8 +86,6 @@ Router.map(function() {
8286
this.route('groups', function() {
8387
this.route('new');
8488
});
85-
this.route('dashboard', function() {});
86-
this.route("not-found", { path: "*path" });
8789

8890
this.route('settings', function() {
8991
this.route('password');

0 commit comments

Comments
 (0)