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

Fix routing for Devise on root namespace #1809

Merged
merged 1 commit into from Jan 15, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/generators/active_admin/install/install_generator.rb
Expand Up @@ -27,7 +27,11 @@ def setup_directory
end

def setup_routes
route "ActiveAdmin.routes(self)"
if ARGV.include? "--skip-users"
route "ActiveAdmin.routes(self)"
else # Ensure Active Admin routes occur after Devise routes so that Devise has higher priority
inject_into_file "config/routes.rb", "\n ActiveAdmin.routes(self)", :after => /devise_for.*/
end
end

def create_assets
Expand Down