Skip to content

Commit

Permalink
Fix wordings
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismccord committed Jan 15, 2015
1 parent eb1dc59 commit f22f4ab
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ $ mix ashes.generate controller <controllername>
```

```elixir
# routes.ex
# web/router.ex
defmodule MyApp.Router do
resource "/my", MyController
...
scope "/", MyApp do
resources "/my", MyController
end
end
```

Will give you the following methods by default:
Will give you the following functions by default:

* index
* edit
Expand All @@ -34,7 +37,7 @@ Will give you the following methods by default:
* delete

**Options**
* `--skip-form` - removes the `edit` and `new` methods from the controller (likely used for APIs)
* `--skip-form` - removes the `edit` and `new` functions from the controller (likely used for APIs)
* `--skip-view` - doesn't create a view module
* `--skip-template`- doesn't create a folder for templates

Expand All @@ -46,15 +49,16 @@ $ mix ashes.generate channel <channelname> [events]
```
```elixir
# routes.ex
defmodule MyApp.Routes do
defmodule MyApp.Router do
...
socket "/ws", MyApp do
channel "my:*", MyChannel
end
end
```

Will give you the following methods by default:
* `join(_topic, socket)`
Will give you the following functions by default:
* `join(_topic, message, socket)`
* `leave(_reason, socket)`

If you provide events in the generate command, they will be added to the channel as
Expand Down

0 comments on commit f22f4ab

Please sign in to comment.