lib/mobility/backends/sequel/table/query_methods.rb in mobility-0.3.2 vs lib/mobility/backends/sequel/table/query_methods.rb in mobility-0.3.3
- old
+ new
@@ -19,10 +19,10 @@
def define_join_method(association_name, translation_class, table_name: nil, foreign_key: nil, **)
define_method :"join_#{association_name}" do |**options|
if joins = @opts[:join]
# Return self if we've already joined this table
- return self if joins.find { |clause| clause.table_expr == table_name }
+ return self if joins.any? { |clause| clause.table_expr == table_name }
end
join_type = options[:outer_join] ? :left_outer : :inner
join_table(join_type,
translation_class.table_name,