Skip to content

Commit

Permalink
Fix mounting of multiple ember apps in Rails' routes
Browse files Browse the repository at this point in the history
Because `mount_ember_app :frontend, to: "/"` catches everything, `mount_ember_app :admin_panel, to: "/admin_panel"` would be never reached if specified below the frontend route.
  • Loading branch information
vfonic authored and seanpdoyle committed Jun 29, 2017
1 parent 2b52a22 commit 1089254
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -476,13 +476,13 @@ EmberCli.configure do |c|
end
```

Next, mount the applications alongside the rest of Rails' routes:
Next, mount the applications alongside the rest of Rails' routes. Note that `admin_panel` route is added before the `frontend` route because it's more specific:

```rb
# /config/routes.rb
Rails.application.routes.draw do
mount_ember_app :frontend, to: "/"
mount_ember_app :admin_panel, to: "/admin_panel"
mount_ember_app :frontend, to: "/"
end
```

Expand Down

0 comments on commit 1089254

Please sign in to comment.