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

Routing breaks when the scaffold/resource contains "end" in the name #172

Open
CarlosAndresRamirez opened this issue Mar 4, 2020 · 1 comment

Comments

@CarlosAndresRamirez
Copy link

CarlosAndresRamirez commented Mar 4, 2020

Hello team,
I just found out that, when you create a scaffold/resource/route that contains "end" in the name, then the parsing of the routing file will fail next time. Basically, it will assume it is the "end" of the routes :web do section.

REPRODUCING THE BUG
amber g scaffold gender name:string

After this, try adding any other scaffold, the action will fail with:
"syntax error in './config/routes.cr:138:14': unexpected token: DELIMITER_START"
When checking the routes.cr file it is broken at the resources line for "gender" like this:
resources "g
---new scaffold here---
enders", GenderController

Thanks,

@CarlosAndresRamirez CarlosAndresRamirez changed the title Routing breaks when certain scaffold names are used Routing breaks when the scaffold/resource contains "end" in the name Mar 4, 2020
@drujensen
Copy link
Member

@CarlosAndresRamirez Wow. Thanks for reporting this.

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