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

Generator Appends Hello World Route to Other Engines #89

Closed
robwise opened this issue Nov 6, 2015 · 2 comments
Closed

Generator Appends Hello World Route to Other Engines #89

robwise opened this issue Nov 6, 2015 · 2 comments

Comments

@robwise
Copy link
Contributor

robwise commented Nov 6, 2015

In the case where users have multiple engines in their routes file, the built-in Rails generator helper, route, will add the route to all of the engines. It should only be appending the route once.

I believe this is due to the helper's reliance on gsub and their use of routes.draw do instead of Rails.application.routes.draw do, since the former will result in false positives.

Relevant links:

@justin808
Copy link
Member

This is not incredibly serious as we ask user to commit files before running the generator, and this can be manually fixed.

@robwise
Copy link
Contributor Author

robwise commented Nov 6, 2015

@justin808 true, it's borderline whether we should even fix this here, as it's really a bug with Rails's Generators::Helpers.route IMO

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

2 participants