DEV: Extract out compound conditional (#13008)

DEV: Extract out compound conditional (#13008)

diff --git a/app/models/category.rb b/app/models/category.rb
index 315a4fa..e2c6edc 100644
--- a/app/models/category.rb
+++ b/app/models/category.rb
@@ -785,7 +785,7 @@ class Category < ActiveRecord::Base
   end
 
   def update_reviewables
-    if SiteSetting.enable_category_group_moderation? && saved_change_to_reviewable_by_group_id?
+    if should_update_reviewables?
       Reviewable.where(category_id: id).update_all(reviewable_by_group_id: reviewable_by_group_id)
     end
   end
@@ -914,6 +914,10 @@ class Category < ActiveRecord::Base
 
   private
 
+  def should_update_reviewables?
+    SiteSetting.enable_category_group_moderation? && saved_change_to_reviewable_by_group_id?
+  end
+
   def check_permissions_compatibility(parent_permissions, child_permissions)
     parent_groups = parent_permissions.map(&:first)
 

GitHub sha: ee880c4c

This commit appears in #13008 which was approved by jjaffeux. It was merged by blake.