]> git.openstreetmap.org Git - rails.git/blob - app/models/message.rb
Doing a resync from mainline 8633:10895. There was one simple to resolve conflict...
[rails.git] / app / models / message.rb
1 class Message < ActiveRecord::Base
2   belongs_to :sender, :class_name => "User", :foreign_key => :from_user_id
3   belongs_to :recipient, :class_name => "User", :foreign_key => :to_user_id
4
5   validates_presence_of :title, :body, :sent_on, :sender, :recipient
6   validates_inclusion_of :message_read, :in => [ true, false ]
7   validates_associated :sender, :recipient
8 end