@@ -12,7 +12,7 @@ def self.sideloading_classes
1212 has_many : Graphiti ::Adapters ::ActiveRecord ::HasManySideload ,
1313 has_one : Graphiti ::Adapters ::ActiveRecord ::HasOneSideload ,
1414 belongs_to : Graphiti ::Adapters ::ActiveRecord ::BelongsToSideload ,
15- many_to_many : Graphiti ::Adapters ::ActiveRecord ::ManyToManySideload ,
15+ many_to_many : Graphiti ::Adapters ::ActiveRecord ::ManyToManySideload
1616 }
1717 end
1818
@@ -82,24 +82,24 @@ def filter_string_not_suffix(scope, attribute, value)
8282 # Arel has different match escaping behavior before rails 5.
8383 # Since rails 4.x does not expose methods to escape LIKE statements
8484 # anyway, we just don't support proper LIKE escaping in those versions.
85- if ::ActiveRecord . version >= Gem ::Version . new ( ' 5.0.0' )
85+ if ::ActiveRecord . version >= Gem ::Version . new ( " 5.0.0" )
8686 def filter_string_match ( scope , attribute , value , is_not : false )
8787 escape_char = '\\'
8888 column = column_for ( scope , attribute )
89- map = value . map do |v |
89+ map = value . map { |v |
9090 v = v . downcase
9191 v = scope . sanitize_sql_like ( v )
9292 "%#{ v } %"
93- end
93+ }
9494 clause = column . lower . matches_any ( map , escape_char , true )
9595 is_not ? scope . where . not ( clause ) : scope . where ( clause )
9696 end
9797 else
9898 def filter_string_match ( scope , attribute , value , is_not : false )
9999 column = column_for ( scope , attribute )
100- map = value . map do |v |
100+ map = value . map { |v |
101101 "%#{ v . downcase } %"
102- end
102+ }
103103 clause = column . lower . matches_any ( map )
104104 is_not ? scope . where . not ( clause ) : scope . where ( clause )
105105 end
0 commit comments