Skip to content

Commit

Permalink
Add information about generation action with --method
Browse files Browse the repository at this point in the history
  • Loading branch information
davydovanton committed Jan 30, 2016
1 parent 4483120 commit 35357e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions source/guides/command-line/generators.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion source/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 35357e9

Please sign in to comment.