I have a couple of projects with Restful Authentication

The first snippet is from the Git repo today and is supposed to be the
newer code.

    # Store the given user id in the session.
    def current_user=(new_user)
      session[:user_id] = new_user ? new_user.id : nil
      @current_user = new_user || false
    end


  # Store the given user id in the session.
  def current_user=(new_user)
    session[:user_id] = (new_user.nil? || new_user.is_a?(Symbol)) ?
nil : new_user.id
    @current_user = new_user || :false
  end

Why did "@current_user = new_user || :false" become false? and how
did :false work at all.
Why did we stop caring that new_user is a Symbol? and how could that
happen anyway.

Both are somewhat hypothetical questions, but I am curious.

Thanks 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to