FIX: max_topics_per_day was not working

This commit is contained in:
Robin Ward 2015-09-24 12:04:41 -04:00
parent a8081c8dd0
commit a1877e8292

View File

@ -262,8 +262,11 @@ class Topic < ActiveRecord::Base
# Additional rate limits on topics: per day and private messages per day
def limit_topics_per_day
apply_per_day_rate_limit_for("topics", :max_topics_per_day)
limit_first_day_topics_per_day if user && user.first_day_user?
if user && user.first_day_user?
limit_first_day_topics_per_day
else
apply_per_day_rate_limit_for("topics", :max_topics_per_day)
end
end
def limit_private_messages_per_day