Hello Finished reading chapter 9 and im a little bit confused.
1. In the tutorial, Modules are used instead of creating a Model and working in a class inside a module , like in authenticating passwords. Wouldn't that be possible? Or is it unnecessary since we're not messing with a database in terms of storing data? 2. what is the difference between session[:remember_token] = user.id and cookies[:remember_token] ? Session stores the cookie locally until we exit the browser and then it gets deleted whereas cookies is permanent stored even after we exit the browser? 3. In section 9.3.3 we are being introduced to the curent user with the code in the module SessionsHelper self.current_user = user Why do we use the "self"? and not just current_user since we use it as a variable object and not as an object attribute ? Or is it a way to say sessions.current_user = user ? 4. What's the purpose of def current_user=(user) and of def current_user in listing 9.16 ? Couldnt we avoid all that using a single method? Thank you in advance! -- 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.

