Skip to content
Browse files

Replace "name" with "author" in the Cookies example

I think doing `@comments.name` is a little confusing, just doesn't sounds right.
  • Loading branch information...
1 parent c15b65d commit 688d8bf4435405a1d78f9223e2000ef791e9b9bc @agis- agis- committed Nov 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 guides/source/action_controller_overview.md
View
4 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)

0 comments on commit 688d8bf

Please sign in to comment.
Something went wrong with that request. Please try again.