adding messaging function, needs tests...

This commit is contained in:
Mike McCabe
2013-10-13 21:49:17 -04:00
parent b0a5248c05
commit 8c17a3df0e
6 changed files with 304 additions and 148 deletions
+6 -1
View File
@@ -1,5 +1,10 @@
class Message < ActiveRecord::Base
belongs_to :user
attr_accessible :creator_id, :message, :read, :receiver_id
validates_presence_of :creator_id, :receiver_id, :message
def creator_name
creator = User.where(:id => self.creator_id).first
creator.full_name
end
end