Sha256: a0c587bfc2b137759ffe870a54979fe792b54e03a78b1177363c43164a2b9a9e

Contents?: true

Size: 253 Bytes

Versions: 10

Compression:

Stored size: 253 Bytes

Contents

class User
  include DataMapper::Resource

  property :id, Serial
  property :email, String
  property :password, String

  def self.authenticate(email, password)
    u = self.first(:email => email)
    u && u.password == password ? u : nil
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sinatra_warden-0.2.0.2 spec/fixtures/user.rb
sinatra_warden-0.2.0.1 spec/fixtures/user.rb
sinatra_warden-0.1.5.1 spec/fixtures/user.rb
sinatra_warden-0.2.0 spec/fixtures/user.rb
sinatra_warden-0.1.9 spec/fixtures/user.rb
sinatra_warden-0.1.8 spec/fixtures/user.rb
sinatra_warden-0.1.7 spec/fixtures/user.rb
sinatra_warden-0.1.6 spec/fixtures/user.rb
sinatra_warden-0.1.5 spec/fixtures/user.rb
sinatra_warden-0.1.4 spec/fixtures/user.rb