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

Add information about generation action with --method #135

Merged
merged 1 commit into from
Jan 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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