Problems with Auth to my mysql db.

Hi, I am new to ruby/rails. learning fast but still getting stuck on key places..
so I have a db and a colum called email and crypt one is obviosly the email of the users and the other the password column.
so I have this controller for the main application controller:

sorry the title of my last email is confusing since looks like I am
having trouble with mysql, but no is with my code.

rek2 escribió:

> def self.authenticate(email, crypt)
> password = crypt
> if email
> salt = [Array.new(6){rand(256).chr}.join].pack("m").chomp
> expected_password = password.crypt(salt)
> if Users.crypt != expected_password
> email = nil

You do know that you need the salt to be the same as when you
originally created the user right? (if not what would be the point of
it?)

Fred