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 and Destroy nested actions via CLI #835

Merged
merged 2 commits into from Oct 3, 2017

Conversation

Projects
None yet
4 participants
@gizotti
Copy link
Contributor

gizotti commented Sep 28, 2017

cc @mereghost, @jodosha

This PR fixes a bug described on #833.

Changes toHanami::CLI::Commands::Generate::Action

  • assign controller_and_action_name(action) to *controller so it gets all the controller namespaces.
  • pass classfied_controller_name to Context to be used in templates
  • join *controller array with "/" to be used in the routes file

Changes to action and view templates

  • Use classified_controller_name instead of controller.classify

Chagnes to Hanami::CLI::Commands::Destroy::Action

  • Introduce namespaced_controller method
  • Ensure controller_and_action_name handles namespaced controller using the new namespaced_controller method

gizotti added some commits Sep 28, 2017

@AlfonsoUceda AlfonsoUceda requested a review from hanami/core Oct 1, 2017

@AlfonsoUceda
Copy link
Member

AlfonsoUceda left a comment

@gizotti thanks so much, LGTM 👍 @hanami/core what do you think?

@AlfonsoUceda AlfonsoUceda requested a review from hanami/core Oct 1, 2017

@davydovanton
Copy link
Member

davydovanton left a comment

looks great. Nice work 👍

@jodosha jodosha changed the title Generate and Destroy actions via CLI Generate and Destroy nested actions via CLI Oct 3, 2017

@jodosha jodosha added the fix label Oct 3, 2017

@jodosha jodosha self-assigned this Oct 3, 2017

@jodosha jodosha added this to the v1.1.0 milestone Oct 3, 2017

@jodosha

This comment has been minimized.

Copy link
Member

jodosha commented Oct 3, 2017

@gizotti This looks great. Thank you very much! 👍

@jodosha jodosha merged commit 9e30d93 into hanami:develop Oct 3, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gizotti gizotti deleted the gizotti:cli-genereta-and-destroy-namespaced-action branch Oct 3, 2017

@gizotti

This comment has been minimized.

Copy link
Contributor Author

gizotti commented Oct 3, 2017

Thanks @AlfonsoUceda, @davydovanton, @jodosha. More than happy to help.

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