diff options
-rw-r--r-- | app/models/message.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/message.rb b/app/models/message.rb index bf2c13eab..5e9caddaf 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -60,10 +60,10 @@ class Message < ActiveRecord::Base after_destroy :reset_counters! after_create_commit :send_notification - scope :visible, lambda {|*args| + scope :visible, (lambda do |*args| joins(:board => :project). where(Project.allowed_to_condition(args.shift || User.current, :view_messages, *args)) - } + end) safe_attributes 'subject', 'content' safe_attributes( |