gregbell/active_admin — pull request #1809 by Daxter (2012-12-08 16:58:52+00:00)
Title: routing fixed for Devise on root namespace

This PR fixes session logout routing by ensuring that Devise routes have higher priority than Active Admin routes. Before, I would have to manually reorder my routes file, or users would be greeted with `RecordNotFound : Couldn't find User with id=logout` when trying to log out.

If you're curious, the problem originally stemmed from the `route` function. It only ever inserts routes at the top of the file. Devise runs first, using `route` which puts it at the top, then we use the very same function to put *ours* at the top.

If there is a real way to write tests for this, please let me know.