This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Accessing Radiant's User Model
Example Code
# User(id: integer, name: string, email: string, login: string, password: string, created_at: datetime, updated_at: datetime, created_by_id: integer, updated_by_id: integer, admin: boolean, developer: boolean, notes: text, lock_version: integer, salt: string, session_token: string)
class User < ActiveRecord::Base
# Default Order
order_by 'name'
# Associations
belongs_to :created_by, :class_name => 'User'
belongs_to :updated_by, :class_name => 'User'
# Validations
validates_uniqueness_of :login, :message => 'login already in use'
validates_confirmation_of :password, :message => 'must match confirmation', :if => :confirm_password?
validates_presence_of :name, :login, :message => 'required'
validates_presence_of :password, :password_confirmation, :message => 'required', :if => :new_record?
validates_format_of :email, :message => 'invalid e-mail address', :allow_nil => true, :with => /^$|^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
validates_length_of :name, :maximum => 100, :allow_nil => true, :message => '%d-character limit'
validates_length_of :login, :within => 3..40, :allow_nil => true, :too_long => '%d-character limit', :too_short => '%d-character minimum'
validates_length_of :password, :within => 5..40, :allow_nil => true, :too_long => '%d-character limit', :too_short => '%d-character minimum', :if => :validate_length_of_password?
validates_length_of :email, :maximum => 255, :allow_nil => true, :message => '%d-character limit'
validates_numericality_of :id, :only_integer => true, :allow_nil => true, :message => 'must be a number'
...
end






