Skip to content

Commit

Permalink
Merge pull request #135 from davydovanton/action-method
Browse files Browse the repository at this point in the history
Add information about generation action with --method
  • Loading branch information
Trung Lê committed Jan 30, 2016
2 parents 650ea38 + 35357e9 commit d3d0ddf
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
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
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 d3d0ddf

Please sign in to comment.