mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Readability fix [ci skip]
This commit is contained in:
parent
9232ba7119
commit
2273f5228a
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ class ClientsController < ApplicationController
|
|||
end
|
||||
```
|
||||
|
||||
As an example, if a user goes to `/clients/new` in your application to add a new client, Rails will create an instance of `ClientsController` and call its `new` method. Note that the empty method from the example above would work just fine because Rails will by default render the `new.html.erb` view unless the action says otherwise. The `new` method could make available to the view a `@client` instance variable by creating a new `Client`:
|
||||
As an example, if a user goes to `/clients/new` in your application to add a new client, Rails will create an instance of `ClientsController` and call its `new` method. Note that the empty method from the example above would work just fine because Rails will by default render the `new.html.erb` view unless the action says otherwise. By creating a new `Client`, the `new` method can make a `@client` instance variable accessible in the view:
|
||||
|
||||
```ruby
|
||||
def new
|
||||
|
|
Loading…
Reference in a new issue