lib/cancan/config.rb in cancancan-3.3.0 vs lib/cancan/config.rb in cancancan-3.4.0
- old
+ new
@@ -1,10 +1,14 @@
# frozen_string_literal: true
module CanCan
def self.valid_accessible_by_strategies
strategies = [:left_join]
- strategies << :subquery unless does_not_support_subquery_strategy?
+
+ unless does_not_support_subquery_strategy?
+ strategies.push(:joined_alias_exists_subquery, :joined_alias_each_rule_as_exists_subquery, :subquery)
+ end
+
strategies
end
# Determines how CanCan should build queries when calling accessible_by,
# if the query will contain a join. The default strategy is `:subquery`.