Skip to content

Commit

Permalink
Flesh out rails routing simplified some more
Browse files Browse the repository at this point in the history
  • Loading branch information
radar committed Oct 22, 2012
1 parent 271cd51 commit a227538
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rails-routing-simplified.md
Expand Up @@ -17,3 +17,5 @@ end
```

This routing code defines a route that responds only to HTTP `GET` requests to `/home`, and gets `HomeController` to serve the request with its `index` action. When you make a request to this action, a new instance of the `HomeController` class is initialized and the `index` method is called. This method should make calls to models (or other data sources), collecting information for your views. Once this method has finished running, then an implicit render takes place, rendering the view template with the same name as the action: `app/views/home/index.html.erb`.

Only instance variables defined within the `index` method of the controller will be available in the `app/views/home/index.html.erb`. Other actions inside the controller will not provide instance variables for this template unless this template is rendered from those actions.

0 comments on commit a227538

Please sign in to comment.