brightin/brightcontent

View on GitHub
core/app/models/brightcontent/admin_user.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Brightcontent
  class AdminUser < ActiveRecord::Base
    has_secure_password
    validates_uniqueness_of :email
    attr_accessible *column_names if defined? ProtectedAttributes

    def self.authenticate(email, password)
      find_by_email(email).try :authenticate, password
    end

    def resources
      Brightcontent::RoutesParser.new.resources
    end
  end
end