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

Generate is not idempotent for routes #232

Closed
ariejan opened this issue Nov 12, 2015 · 3 comments
Closed

Generate is not idempotent for routes #232

ariejan opened this issue Nov 12, 2015 · 3 comments

Comments

@ariejan
Copy link

ariejan commented Nov 12, 2015

Running rails generate administrate:install more than once will add extra admin namespace blocks to config/routes.rb. Probably a low priority thing, but people using the generate command to just "reset" their work in progress might run into this.

@Marthyn
Copy link
Contributor

Marthyn commented Nov 12, 2015

Yeah same stuff here, whenever i run a migration i like to update my dashboard automatically too. But i have to remove this every time

  namespace :admin do
    DashboardManifest::DASHBOARDS.each do |dashboard_resource|
      resources dashboard_resource
    end

    root controller: DashboardManifest::ROOT_DASHBOARD, action: :index
  end

@c-lliope
Copy link
Contributor

I think the easiest way to fix this would be checking to see if the routes are defined before generating them again. Thanks for the feedback!

@c-lliope
Copy link
Contributor

Fixed by #282.

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

No branches or pull requests

3 participants