Sha256: 05a6c244627bf60cf1d309956b6165536152ea93a757ccadb73242a0a09877bd
Contents?: true
Size: 723 Bytes
Versions: 1
Compression:
Stored size: 723 Bytes
Contents
require 'nitro/auth' module Basic # An extended user object. class User < Auth::User # Add name and email fields. property :name, String, :sql => "varchar(255) not null" property :email, String, :sql => "varchar(255) not null unique", :unique => true # Add a relationship with an application object. has_many Site def initialize(login = nil, password = nil, parameters = {}) super(login, password, parameters) # Should probably sanity check these, since they're coming # in over the web, but this'll do for now. @name = parameters["name"] @email = parameters["email"] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nitro-auth-0.2.0 | examples/basic/src/basic/user.rb |