Sha256: dd4605124445af315b1d9d8ea64ea5b97a644d92f6fec8db15aeb7a725e24129

Contents?: true

Size: 561 Bytes

Versions: 9

Compression:

Stored size: 561 Bytes

Contents

case DOORKEEPER_ORM
when :active_record
  class User < ActiveRecord::Base
  end
when :mongoid2, :mongoid3
  class User
    include Mongoid::Document
    include Mongoid::Timestamps

    field :name, :type => String
    field :password, :type => String
  end
when :mongo_mapper
  class User
    include MongoMapper::Document
    timestamps!

    key :name,     String
    key :password, String
  end
end

class User
  attr_accessible :name, :password

  def self.authenticate!(name, password)
    User.where(:name => name, :password => password).first
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
doorkeeper-0.6.7 spec/dummy/app/models/user.rb
doorkeeper-0.6.6 spec/dummy/app/models/user.rb
doorkeeper-0.6.5 spec/dummy/app/models/user.rb
doorkeeper-0.6.4 spec/dummy/app/models/user.rb
doorkeeper-0.6.3 spec/dummy/app/models/user.rb
doorkeeper-0.6.2 spec/dummy/app/models/user.rb
doorkeeper-0.6.1 spec/dummy/app/models/user.rb
doorkeeper-0.6.0 spec/dummy/app/models/user.rb
doorkeeper-0.6.0.rc1 spec/dummy/app/models/user.rb