★ wanayoo — archive 1999 https://github.com/ember-cli/ember-cli.github.io/issues/78Nouvelle recherche | Portail wanayoo
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 options #78

Open
SpikedKira opened this issue May 18, 2016 · 1 comment
Open

Generator options #78

SpikedKira opened this issue May 18, 2016 · 1 comment
Labels
bug

Comments

@SpikedKira
Copy link

@SpikedKira SpikedKira commented May 18, 2016

http://ember-cli.com/extending/#generators-and-blueprints

"The afterInstall and afterUninstall hooks receives the same arguments as locals"

"ember generate controller foo --type=array --dry-run"
"The object passed to locals looks like this:"

{
  entity: {
    name: 'foo',
    options: {
      type: 'array'
    }
  },
  dryRun: true
}

I believe options.entity.options is incorrect.
Seems like I am receiving:

{
  entity: {
    name: 'foo'
  },
  dryRun: true,
  type: 'array'
}
@maxwondercorn
Copy link

@maxwondercorn maxwondercorn commented Nov 20, 2018 •

I'm helping port the blueprints section from the old ember-cli guide to the new one and verifying the examples as I go through the guide. Came across the same issue.

Something like ember generate controller foo isAdmin:true --type=array --dry-run
generates an object that's closer to the intent of the example

{
 entity: {
    name: 'foo',
     options: {
        isAdmin: true
     }
  },
  dryRun: true
  type: 'array'
 }

If desired, I can create a PR based on my alternate example or something similar. I'll have a few more issues related to things I've found while reviewing the guides

Edited: actually this should be an issue with on ember-cli to update the code comments. The new guides will be corrected as they are created.

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

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.