Skip to content

Instantly share code, notes, and snippets.

@janvarljen
janvarljen / branched-routing.md
Last active August 19, 2016 14:21
Ember branched routing

The problem

Applications often need to expose a part of the app in different context without breaking the current context. The simplified example would be the "settings" modal. You want to be able to open the settings modal from everywhere in you app without losing the current context.

Let's say we have a really simple app:

Router.map(function() {
  this.route('projects', {}, function() {
    this.route('dashboard');
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
## Uncomment and set this to only include directories you want to watch
# directories %w(app lib config test spec features) \
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
## Note: if you are using the `directories` clause above and you are not
## watching the project directory ('.'), then you will want to move
## the Guardfile to a watched dir and symlink it back, e.g.
require 'zeus/rails'
class CustomPlan < Zeus::Rails
end
Zeus.plan = CustomPlan.new