Sha256: a31307c020719739f805a39408c672e5271c36a4b54f2d4454bbd8cf63a03ddf
Contents?: true
Size: 667 Bytes
Versions: 5
Compression:
Stored size: 667 Bytes
Contents
require 'rubygems' require 'bundler/setup' require 'mongo_mapper' require 'entrance' MongoMapper.connection = Mongo::Connection.new('localhost') MongoMapper.database = 'entrance-example' Entrance.configure do |config| config.remember_for = 1.month config.cookie_secure = false # for testing end class User include MongoMapper::Document include Entrance::Model key :state, :default => 'active' key :name key :email, :unique => true key :password_hash key :remember_token key :remember_token_expires_at, Time key :reset_token key :reset_token_expires_at, Time provides_entrance def active? state.to_sym == :active end end
Version data entries
5 entries across 5 versions & 1 rubygems