Sha256: d5b0e95ccbaa9e4b48e2b75bdac153a68a39d3ad0dbcb8830d5fbefad41de9a9

Contents?: true

Size: 252 Bytes

Versions: 6

Compression:

Stored size: 252 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

6 entries across 6 versions & 2 rubygems

Version Path
sinatra_warden-1.0.0 spec/fixtures/user.rb
sinatra_warden-0.3.2 spec/fixtures/user.rb
sinatra_warden-0.3.1 spec/fixtures/user.rb
alex-sinatra_warden-0.3.0.2 spec/fixtures/user.rb
alex-sinatra_warden-0.3.0.1 spec/fixtures/user.rb
sinatra_warden-0.3.0 spec/fixtures/user.rb