def authenticateAdmin
    authenticate_or_request_with_http_basic do |name, password|
      name == "admin" || "slt" and password == "admin" || "slt"
    end
  end

Im pretty sure that should work. "and" is evaluated after && . They're 
now equivalent - its a ruby thing.

If it still doesnt work:

  def authenticateAdmin
    authenticate_or_request_with_http_basic do |name, password|
      (name == "admin" || "slt") and (password == "admin" || "slt")
    end
  end


I hope I understood your question correctly. :P
-- 
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