Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix mass assignment error when replying to message

  • Loading branch information...
commit f1276146f7baa1879a6820c9819fd646a525969f 1 parent f199b2d
Trevor Bullock t-bullock authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/models/message.rb
4 app/models/message.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.