Permalink
Browse files

fix mass assignment error when replying to message

  • Loading branch information...
1 parent f199b2d commit f1276146f7baa1879a6820c9819fd646a525969f @t-bullock t-bullock committed Mar 11, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 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 f127614

Please sign in to comment.