Skip to content

Commit

Permalink
A message could be an abuse.
Browse files Browse the repository at this point in the history
  • Loading branch information
aitor committed Sep 18, 2008
1 parent dc30076 commit 9451512
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/message.rb
@@ -1,4 +1,5 @@
class Message < ActiveRecord::Base

belongs_to :folder

belongs_to :from, :class_name => "User", :foreign_key => "from_user_id"
Expand All @@ -9,7 +10,8 @@ class Message < ActiveRecord::Base
validates_presence_of :to

record_activity_of :from_user

acts_as_abusable

def read!
update_attribute(:is_read, true)
end
Expand Down

0 comments on commit 9451512

Please sign in to comment.