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

Calling "g scaffold" multiple times on the same model adds multiple items to views/layouts/_nav #831

Closed
sol-vin opened this issue May 29, 2018 · 3 comments

Comments

@sol-vin
Copy link

sol-vin commented May 29, 2018

Description

Calling amber g scaffold on the same model multiple times will add mutliple menu items to views/layouts/_nav

Steps to Reproduce

  1. Make a new amber project, set up db, etc.
  2. amber g scaffold ImAModel name:string
  3. amber g scaffold ImAModel name:string
  4. amber watch
  5. Visit 127.0.0.1:3000
  6. Should be multiple of the same menu item in the header menu.

Expected behavior: Not to make multiple nav items for the same item

Actual behavior: Makes multiple nav items for the same item

Reproduces how often: 100%

Versions

Amber CLI (amberframework.org) - v0.7.2

Additional Information

Nope

@eliasjpr
Copy link
Contributor

Thanks for reporting this issue. It is a known issue and it would be great if someone can dedicate some time to prevent this from happening. Would you like to take on this task @redcodefinal?

@pynixwang
Copy link
Contributor

@eliasjpr do not add to _nav will prevent this happening.

this feature is almost useless.

@drujensen
Copy link
Member

#1018 enables interactive mode so it will warn you if you try to run the same generator twice. Adding a new resource to the navigation isn't useless. If you don't like the current generators, you can always create your own recipes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants