diff --git a/app/models/post_action.rb b/app/models/post_action.rb index 8996b9f1b..74e5e1d29 100644 --- a/app/models/post_action.rb +++ b/app/models/post_action.rb @@ -15,8 +15,6 @@ class PostAction < ActiveRecord::Base rate_limit :post_action_rate_limiter - validate :message_quality - scope :spam_flags, -> { where(post_action_type_id: PostActionType.types[:spam]) } def self.update_flagged_posts_count @@ -183,12 +181,6 @@ class PostAction < ActiveRecord::Base end end - def message_quality - return if message.blank? - sentinel = TextSentinel.title_sentinel(message) - errors.add(:message, I18n.t(:is_invalid)) unless sentinel.valid? - end - before_create do post_action_type_ids = is_flag? ? PostActionType.flag_types.values : post_action_type_id raise AlreadyActed if PostAction.where(user_id: user_id, diff --git a/spec/models/post_action_spec.rb b/spec/models/post_action_spec.rb index 29cf1d85c..3eee76bae 100644 --- a/spec/models/post_action_spec.rb +++ b/spec/models/post_action_spec.rb @@ -15,7 +15,7 @@ describe PostAction do describe "flagged_posts_report" do it "operates correctly" do PostAction.act(codinghorror, post, PostActionType.types[:spam]) - mod_message = PostAction.act(Fabricate(:user), post, PostActionType.types[:notify_moderators], message: "this post really sucks a lot I hate it") + mod_message = PostAction.act(Fabricate(:user), post, PostActionType.types[:notify_moderators], message: "this is a 10") posts, users = PostAction.flagged_posts_report("") posts.count.should == 1