Fixed bug in messaging system. Moved navigation 'messages' to 'foodcoop' tab.

This commit is contained in:
Benjamin Meichsner 2009-03-06 19:38:06 +01:00
parent a29053b4e9
commit a30444a602
2 changed files with 4 additions and 4 deletions

View file

@ -37,7 +37,7 @@ class Message < ActiveRecord::Base
# clean up the recipients_ids
def before_validation_on_create
self.recipients_ids = recipients_ids.uniq.reject { |id| id.blank? } unless recipients_ids.nil?
self.recipients_ids = User.all.collect(&:id) if sent_to_all == 1
self.recipients_ids = User.all.collect(&:id) if sent_to_all == "1"
end
def add_recipients(users)