mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
guides should tell people to write ruby code, not output
This commit is contained in:
parent
3c6f35dc03
commit
ea4db3bc07
1 changed files with 7 additions and 0 deletions
|
@ -574,8 +574,15 @@ whether the model was saved or not.
|
|||
If you submit the form again now, Rails will complain about not finding
|
||||
the `show` action. That's not very useful though, so let's add the
|
||||
`show` action before proceeding.
|
||||
Open the file `config/routes.rb` and add this line.
|
||||
|
||||
```ruby
|
||||
resources :posts
|
||||
```
|
||||
|
||||
If you run `rake routes` in your terminal, several lines will be shown regarding posts, including this:
|
||||
|
||||
```
|
||||
post GET /posts/:id(.:format) posts#show
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue