Sha256: b4c223c35b3737ee629bc723834160dd7a86d333df236d5841844be8465ff2b0
Contents?: true
Size: 926 Bytes
Versions: 11
Compression:
Stored size: 926 Bytes
Contents
module DataMapper module Is module Parse def is_parse(options = {}) property :id, Property::ParseKey property :created_at, Property::ParseDate, field: "createdAt" property :updated_at, Property::ParseDate, field: "updatedAt" end def is_parse_user(options = {}) is_parse(options) storage_names[:default] = "_User" property :username, Property::String property :password, Property::String property :email, Property::String, format: :email_address class << self def authenticate(username, password) result = repository.adapter.sign_in(username, password) get(result["objectId"]) end def request_password_reset(email) repository.adapter.request_password_reset email end end end end end Model.append_extensions(Is::Parse) end
Version data entries
11 entries across 11 versions & 1 rubygems