aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2012-03-17 20:41:06 -0600
committerRyan Bigg <radarlistener@gmail.com>2012-03-17 20:41:06 -0600
commitb30cc24c40629f38d3de1be972a11eaaa67d20c2 (patch)
treefaac2a73e7672af10ec88df01824f07cf8e0004a
parent62d3693288870058f6b963a014ae692f52e805cb (diff)
downloadrails-b30cc24c40629f38d3de1be972a11eaaa67d20c2.tar.gz
rails-b30cc24c40629f38d3de1be972a11eaaa67d20c2.tar.bz2
rails-b30cc24c40629f38d3de1be972a11eaaa67d20c2.zip
[getting started] [ci skip] Explain in better terms what we are doing with render and params[:post] inspection upon first use
-rw-r--r--guides/source/getting_started.textile4
1 files changed, 3 insertions, 1 deletions
diff --git a/guides/source/getting_started.textile b/guides/source/getting_started.textile
index 7b457afb23..4edf772b77 100644
--- a/guides/source/getting_started.textile
+++ b/guides/source/getting_started.textile
@@ -375,7 +375,9 @@ def create
end
</ruby>
-The +render+ method here is taking a very simple hash with the key of +text+ and the value of +params.inspect+. The +params+ method here is the object which represents the parameters (or fields) coming in from the form. If you re-submit the form one more time you'll now no longer get the missing template error. Instead, you'll see something that looks like the following:
+The +render+ method here is taking a very simple hash with the key of +text+ and the value of +params[:post].inspect+. The +params+ method here is the object which represents the parameters (or fields) coming in from the form. The +params+ method returns a +HashWithIndifferentAccess+ object, which allows you to access the keys of the hash using either strings or symbols. In this situation, the only parameters that matter are the ones from the form.
+
+If you re-submit the form one more time you'll now no longer get the missing template error. Instead, you'll see something that looks like the following:
<ruby>
{"title"=>"First post!", "text"=>"This is my first post."}