Shopify/batman — pull request #526 by kristianpd (2012-08-17 22:05:20+00:00)
Title: Break filter chain when redirect occurs

@hornairs @nciagra I'm looking to break filter chains if a `redirect` call is made within a `beforeFilter` to avoid continuing with remaining filters and avoid action from executing on the controller. This current solution is simply inspecting `_afterFilterRedirect` to see if a redirect has been requested.

I've noticed an issue which I believe may be related to `pushState` on the `Navigator` (possibly unrelated to this change) where the following scenario occurs:

```coffee
class FoosController extends Batman.Controller
@beforeFilter: (options) ->
@redirect @get('routes.foos.other') if options.action is 'index'

index: ->
show: ->
other: ->
```

If this is the first request to the application (i.e. a new browser session), a request for
`/foos`
will result in an address bar URL of
`/foos/other` as you'd expect.

If a successful dispatch has already occurred, say to
`/foos/1`
or any other controller action, a request to
`/foos`
will redirect and render accordingly, but the URL in the address bar will remain as
`/foos`
ignoring the redirected URL of
`/foos/other`
though a brief flicker indicates it may have been pushed to the `Navigator` in some manner

Thoughts about this approach so far or insights into the `pushState` issue?