Give a better error message from the server if you've been replying too much.

This commit is contained in:
Robin Ward
2014-01-06 11:10:18 -05:00
parent ec10575a9e
commit 14ec64a36a
2 changed files with 4 additions and 2 deletions

View File

@ -43,7 +43,7 @@ class Validators::PostValidator < ActiveModel::Validator
def max_posts_validator(post)
if post.new_record? && post.acting_user.present? && post.acting_user.posted_too_much_in_topic?(post.topic_id)
post.errors.add(:base, I18n.t(:too_many_replies))
post.errors.add(:base, I18n.t(:too_many_replies, count: SiteSetting.newuser_max_replies_per_topic))
end
end