Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix routing for Devise on root namespace #1809

merged 1 commit into from Jan 15, 2013


None yet
3 participants

seanlinsley commented Dec 8, 2012

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.


pcreux commented Dec 11, 2012

Looks like this is hard to test. Anyone can test this by hand?


seanlinsley commented Dec 11, 2012

Well I did :)
Multiple times

@gregbell gregbell added a commit that referenced this pull request Jan 15, 2013

@gregbell gregbell Merge pull request #1809 from Daxter/fix-devise-routing
Fix routing for Devise on root namespace

@gregbell gregbell merged commit cf2fc16 into activeadmin:master Jan 15, 2013

1 check passed

default The Travis build passed

@seanlinsley seanlinsley deleted the unknown repository branch Feb 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment