Skip to content
Browse files

Merge pull request #167 from t-bullock/message-mass-assignment-fix

fix mass assignment error when replying to message
  • Loading branch information...
2 parents f199b2d + f127614 commit 040485d2bd8b84d4214082d1c46a273e97ba5004 @bborn committed Mar 11, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/models/message.rb
View
4 app/models/message.rb
@@ -2,8 +2,8 @@ class Message < ActiveRecord::Base
attr_accessor :to
attr_accessor :reply_to
- attr_accessible :to, :subject, :body, :recipient, :sender, :recipient_id, :sender_id
-
+ attr_accessible :to, :subject, :body, :recipient, :sender, :recipient_id, :sender_id, :parent_id
+
belongs_to :sender, :class_name => 'User', :foreign_key => 'sender_id', :inverse_of => :sent_messages
belongs_to :recipient, :class_name => 'User', :foreign_key => 'recipient_id', :inverse_of => :received_messages

0 comments on commit 040485d

Please sign in to comment.
Something went wrong with that request. Please try again.