Problem in SessionHelper

hello all,

I am reading rails3 from

In chapter sign in sign out

i am facing one problem

c:/sites/pro/sample_app/app/helpers/sessions_helper.rb:27: syntax
error, unexpected tSTAR
  User.authenticate_with_salt (*remember_token)
c:/sites/pro/sample_app/app/helpers/sessions_helper.rb:36: syntax
error, unexpected $end, expecting keyword_end

My SessionHelper code is as follows


module SessionsHelper

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

def current_user=(user)
  @current_user = user
  def current_user
    @current_user ||= user_from_remember_token

  def signed_in?
  def sign_out
    cookies.delete (:remember_token)
    self.current_user = nil


  def user_from_remember_token
  User.authenticate_with_salt (*remember_token)

  def remember_token
    cookies.signed[:remember_token] || [nil,nil]


I am not getting answer after doing so much google, and due to this
problem i am not able to read more .

You shouldn't use spaces between a method name and its (


I've heard that exclaimed as though Really Bad Things will happen if
that is done. What's the deal? I've used spaces (as was long my
standard coding style) and seen no ill effects, other than a warning
not to do that.