I’m getting this error message since i moved alot of the database
logic to the model.
wrong number of bind variables (0 for 2) in: first_name = ? AND
last_name = ?
def self.authenticate(first_name, last_name, password)
user = User.find(:first, :conditions => [‘first_name = ? AND
last_name = ?’])
if user.blank?
Digest::SHA256.hexdigest(password + user.password_salt) !=
user.password_hash
raise “Username or password invalid”
end
user
end
end
I’m basically copying this out of Rails Recipes so not sure where the
error is.