Sha256: 68e239020826ebf19eaea5e89be806e853ba8cc934a683ff44c6306928f147e4

Contents?: true

Size: 377 Bytes

Versions: 10

Compression:

Stored size: 377 Bytes

Contents

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
brightcontent-core-2.6.0 app/models/brightcontent/admin_user.rb
brightcontent-core-2.5.1 app/models/brightcontent/admin_user.rb
brightcontent-core-2.5.0 app/models/brightcontent/admin_user.rb
brightcontent-core-2.4.6 app/models/brightcontent/admin_user.rb
brightcontent-core-2.4.5 app/models/brightcontent/admin_user.rb
brightcontent-core-2.4.4 app/models/brightcontent/admin_user.rb
brightcontent-core-2.4.3 app/models/brightcontent/admin_user.rb
brightcontent-core-2.4.2 app/models/brightcontent/admin_user.rb
brightcontent-core-2.4.1 app/models/brightcontent/admin_user.rb
brightcontent-core-2.4.0 app/models/brightcontent/admin_user.rb