diff --git a/source/guides/command-line/generators.md b/source/guides/command-line/generators.md index 5b1f5d998..933731b0c 100644 --- a/source/guides/command-line/generators.md +++ b/source/guides/command-line/generators.md @@ -45,6 +45,12 @@ If you wish to generate only the action, without the view and template, you can % bundle exec hanami generate action web books#show --skip-view ``` +If you wish to generate action with specific method, you can do that by using the `--method`. + +```shell +% bundle exec hanami generate action web books#create --method=post +``` + #### Route The generated route is named after the controller name. diff --git a/source/guides/getting-started.md b/source/guides/getting-started.md index 36bed7ae6..90ddd42a2 100644 --- a/source/guides/getting-started.md +++ b/source/guides/getting-started.md @@ -718,7 +718,7 @@ To submit our form, we need yet another action. Let's create a `Books::Create` action: ``` -% hanami generate action web books#create +% hanami generate action web books#create --method=post ``` This adds a new route to our app: