cmather/meteor-mini-pages — pull request #43 by ianserlin (2013-04-01 01:59:59+00:00)
Title: Reactive before filters do not cause url to update

If you have a redirect in a before filter which is triggered, but later the before filter is run again reactively and does not cause a redirect... the appropriate content is displayed but the browser's address bar is not updated.

The problem use case goes something like this:

1. Directly navigate to a url from a blank window that relies on some data being loaded (like an edit resource page)
2. The before filter for that route detects the data is not loaded yet and redirects to the a different page (because we don't know if the user is allowed to edit that resource yet)
3. Once the resource is loaded, the before filter is run again reactively and the user is shown the edit resource page.
4. However, the browser url address bar is not updated to reflect the page the user is currently looking at.

This pull request also adds unit tests, including tests for the modified pagejs.Context object and a redirect example in the examples folder.