You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
class User < ActiveRecord::Base
|
|
validates_uniqueness_of :username
|
|
validates_confirmation_of :password, :on => :create
|
|
validates_length_of :password, :within => 5..40
|
|
|
|
def self.authenticate(user_info)
|
|
find_by_username_and_password(user_info[:username],
|
|
user_info[:password])
|
|
end
|
|
end
|