6 lines
136 B
Ruby
6 lines
136 B
Ruby
|
class User < ActiveRecord::Base
|
||
|
def self.authenticate!(name, password)
|
||
|
User.where(name: name, password: password).first
|
||
|
end
|
||
|
end
|