2011-07-23 21:55:26 +02:00
|
|
|
class User < ActiveRecord::Base
|
|
|
|
validates_presence_of :email, :on => :create
|
|
|
|
validates_presence_of :first_name,:last_name
|
|
|
|
validates_uniqueness_of :email
|
|
|
|
has_many :servers, :dependent => :destroy
|
2011-07-24 15:56:47 +02:00
|
|
|
has_one :prefs, :dependent => :destroy
|
2011-07-23 21:55:26 +02:00
|
|
|
end
|