diff options
author | Agis Anastasopoulos <corestudiosinc@gmail.com> | 2012-11-15 13:46:09 +0200 |
---|---|---|
committer | Agis Anastasopoulos <corestudiosinc@gmail.com> | 2012-11-15 13:46:09 +0200 |
commit | 688d8bf4435405a1d78f9223e2000ef791e9b9bc (patch) | |
tree | e35a5f283b78b500bac9563004f3438183c68b70 /guides/source | |
parent | c15b65db13220505668d04b17787634c733add44 (diff) | |
download | rails-688d8bf4435405a1d78f9223e2000ef791e9b9bc.tar.gz rails-688d8bf4435405a1d78f9223e2000ef791e9b9bc.tar.bz2 rails-688d8bf4435405a1d78f9223e2000ef791e9b9bc.zip |
Replace "name" with "author" in the Cookies example
I think doing `@comments.name` is a little confusing, just doesn't sounds right.
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/action_controller_overview.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/action_controller_overview.md b/guides/source/action_controller_overview.md index 9ebc913817..ea642c8b9f 100644 --- a/guides/source/action_controller_overview.md +++ b/guides/source/action_controller_overview.md @@ -377,7 +377,7 @@ Your application can store small amounts of data on the client — called cookie class CommentsController < ApplicationController def new # Auto-fill the commenter's name if it has been stored in a cookie - @comment = Comment.new(name: cookies[:commenter_name]) + @comment = Comment.new(author: cookies[:commenter_name]) end def create @@ -386,7 +386,7 @@ class CommentsController < ApplicationController flash[:notice] = "Thanks for your comment!" if params[:remember_name] # Remember the commenter's name. - cookies[:commenter_name] = @comment.name + cookies[:commenter_name] = @comment.author else # Delete cookie for the commenter's name cookie, if any. cookies.delete(:commenter_name) |