aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/README
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2006-04-29 16:34:23 +0000
committerMarcel Molina <marcel@vernix.org>2006-04-29 16:34:23 +0000
commit0049bd729f71c804b4c930e38269aa5a40cca158 (patch)
treeda67e66618ff42e7744aab5df69f88ca02bcaf8b /actionpack/README
parentc745f4780442271a2a2dcead4567b3fec9057630 (diff)
downloadrails-0049bd729f71c804b4c930e38269aa5a40cca158.tar.gz
rails-0049bd729f71c804b4c930e38269aa5a40cca158.tar.bz2
rails-0049bd729f71c804b4c930e38269aa5a40cca158.zip
Update README
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4307 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/README')
-rwxr-xr-xactionpack/README10
1 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/README b/actionpack/README
index dc475a6610..88bcab8461 100755
--- a/actionpack/README
+++ b/actionpack/README
@@ -139,7 +139,7 @@ A short rundown of the major features:
end
Layout file (called weblog_layout):
- <html><body><%= @content_for_layout %></body></html>
+ <html><body><%= yield %></body></html>
Template for hello_world action:
<h1>Hello world</h1>
@@ -155,7 +155,7 @@ A short rundown of the major features:
map.connect 'clients/:client_name/:project_name/:controller/:action'
Accessing /clients/37signals/basecamp/project/dash calls ProjectController#dash with
- { "client_name" => "37signals", "project_name" => "basecamp" } in @params["params"]
+ { "client_name" => "37signals", "project_name" => "basecamp" } in params[:params]
From that URL, you can rewrite the redirect in a number of ways:
@@ -338,7 +338,7 @@ A short rundown of the major features:
<input type="submit" value="Create">
</form>
- This form generates a @params["post"] array that can be used directly in a save action:
+ This form generates a params[:post] array that can be used directly in a save action:
class WeblogController < ActionController::Base
def save
@@ -370,7 +370,7 @@ methods:
end
def display
- @post = Post.find(:params[:id])
+ @post = Post.find(params[:id])
end
def new
@@ -394,7 +394,7 @@ And the templates look like this:
weblog/layout.rhtml:
<html><body>
- <%= @content_for_layout %>
+ <%= yield %>
</body></html>
weblog/index.rhtml: