mailr/app/models/user.rb

8 lines
246 B
Ruby
Raw Normal View History

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