adopt-a-hydrant/app/models/user.rb

9 lines
482 B
Ruby
Raw Normal View History

2011-02-23 20:50:59 +00:00
class User < ActiveRecord::Base
2011-03-06 05:21:52 +00:00
devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable
2011-03-06 18:28:00 +00:00
attr_accessible :email, :name, :organization, :voice_number, :sms_number, :password, :password_confirmation, :remember_me
2011-05-22 14:27:36 +00:00
validates_presence_of :name
2011-05-22 14:35:46 +00:00
has_many :reminders_to, :class_name => "Reminder", :foreign_key => "to_user_id"
has_many :reminders_from, :class_name => "Reminder", :foreign_key => "from_user_id"
has_many :things
2011-02-23 20:50:59 +00:00
end