Frederick Cheung wrote in post #1014004:
> On Jul 31, 5:12pm, 7stud -- <[email protected]> wrote:
>> > the @current_user variable instead of calling the current_user= setter
>> > function.
>>
>
> Memoization is an extremely common practice. I find the existence of
> current_user= a little odd.
>

Why's that?  In the SessionsController there is a method that is defined 
like this:

def signin(user)
  cookies.permanent.signed[:remember_token] = [user.id, user.salt]
  self.current_user = user
end

By the way, the book we are discussing is online and we are discussing 
section 9.3:

http://ruby.railstutorial.org/chapters/sign-in-sign-out#sec:signin_success

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to