merge with master

This commit is contained in:
kikito
2015-10-08 15:26:33 +02:00
9 changed files with 128 additions and 10 deletions

View File

@@ -4,9 +4,9 @@ class Manager < ActiveRecord::Base
has_secure_password
def self.valid_auth?(username = nil, password = nil)
def self.valid_manager(username = nil, password = nil)
return false unless username.present? && password.present?
Manager.find_by(username: username).try(:authenticate, password).present?
Manager.find_by(username: username).try(:authenticate, password)
end
end