Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug where the devise_for was being placed below the mounted engine in routes.rb #1335

Merged
merged 3 commits into from Sep 26, 2012

Conversation

coderberry
Copy link

When I perform a rails g rails_admin:install and go through the process, it places the devise_for :admins route below the mount RailsAdmin::Engine => '/admin', :as => 'rails_admin'. This will cause a redirect loop. The fix for this is to place the devise_for above the mount in the routes.rb.

I have modified the order of the generator script to resolve the issue.

@coderberry
Copy link
Author

In your README, you mention that the infinite redirect issue (#715) happens if the devise model name and the route namespace is the same ('administrators' and 'administrator'). This doesn't appear to be the bug at all.

The issue is that the order is incorrect in the route. If you place it in the correct order (devise_for before mount), your example works.

@coderberry
Copy link
Author

I have also updated the README.

coderberry@70b5115

sferik added a commit that referenced this pull request Sep 26, 2012
Fixed bug where the devise_for was being placed below the mounted engine in routes.rb
@sferik sferik merged commit 3a0b832 into railsadminteam:master Sep 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants