From 2251afbac0f8fbe9f506aae1d7191fc0d380b3ce Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 4 Sep 2017 13:14:15 +0100 Subject: [PATCH] =?UTF-8?q?Smart=5Fcreate=5Frule=20should=20only=20use=20?= =?UTF-8?q?=E2=80=98normal=E2=80=99=20rules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/helper.rb b/app/helpers/helper.rb index 42d96ea..1d03461 100644 --- a/app/helpers/helper.rb +++ b/app/helpers/helper.rb @@ -142,7 +142,7 @@ module DiscourseChat # :created if a new rule has been created # false if there was an error def self.smart_create_rule(channel:, filter:, category_id: nil, tags: nil) - existing_rules = DiscourseChat::Rule.with_channel(channel) + existing_rules = DiscourseChat::Rule.with_channel(channel).with_type('normal') # Select the ones that have the same category same_category = existing_rules.select { |rule| rule.category_id == category_id }