Commit d331a14d authored by Maxwell Salzberg's avatar Maxwell Salzberg
Browse files

limit the amount of people in a converasation to prevent hella spam

parent d3487c8b
......@@ -14,6 +14,12 @@ class Conversation < ActiveRecord::Base
belongs_to :author, :class_name => 'Person'
validate :max_participants
def max_participants
errors.add(:max_participants, "too many participants") if participants.count > 20
end
accepts_nested_attributes_for :messages
def recipients
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment