Skip to content

Commit

Permalink
Rubocop: Style/RedundantStringEscape
Browse files Browse the repository at this point in the history
Authored-by: Grant Hutchins <[email protected]>
  • Loading branch information
nertzy committed Oct 25, 2022
1 parent 24b95bb commit 892eec7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions spec/lib/pg_search/configuration/association_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
LEFT OUTER JOIN
(SELECT model_id AS id,
#{column_select} AS #{association.columns.first.alias}
FROM \"#{User.table_name}\"
INNER JOIN \"#{association.table_name}\"
ON \"#{association.table_name}\".\"user_id\" = \"#{User.table_name}\".\"id\") #{association.subselect_alias}
FROM "#{User.table_name}"
INNER JOIN "#{association.table_name}"
ON "#{association.table_name}"."user_id" = "#{User.table_name}"."id") #{association.subselect_alias}
ON #{association.subselect_alias}.id = model_id
SQL
end
Expand Down Expand Up @@ -86,9 +86,9 @@
LEFT OUTER JOIN
(SELECT model_id AS id,
#{column_select} AS #{association.columns.first.alias}
FROM \"#{User.table_name}\"
INNER JOIN \"#{association.table_name}\"
ON \"#{association.table_name}\".\"id\" = \"#{User.table_name}\".\"site_id\") #{association.subselect_alias}
FROM "#{User.table_name}"
INNER JOIN "#{association.table_name}"
ON "#{association.table_name}"."id" = "#{User.table_name}"."site_id") #{association.subselect_alias}
ON #{association.subselect_alias}.id = model_id
SQL
end
Expand Down Expand Up @@ -116,10 +116,10 @@
<<~SQL.squish
LEFT OUTER JOIN
(SELECT model_id AS id,
string_agg(\"#{association.table_name}\".\"name\"::text, ' ') AS #{association.columns.first.alias}
FROM \"#{Site.table_name}\"
INNER JOIN \"#{association.table_name}\"
ON \"#{association.table_name}\".\"site_id\" = \"#{Site.table_name}\".\"id\"
string_agg("#{association.table_name}"."name"::text, ' ') AS #{association.columns.first.alias}
FROM "#{Site.table_name}"
INNER JOIN "#{association.table_name}"
ON "#{association.table_name}"."site_id" = "#{Site.table_name}"."id"
GROUP BY model_id) #{association.subselect_alias}
ON #{association.subselect_alias}.id = model_id
SQL
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/pg_search/features/tsearch_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@

feature = described_class.new(query, options, columns, Model, normalizer)
expect(feature.conditions.to_sql).to eq(
%{((#{Model.quoted_table_name}.\"my_tsvector\") @@ (to_tsquery('simple', ''' ' || 'query' || ' ''')))}
%{((#{Model.quoted_table_name}."my_tsvector") @@ (to_tsquery('simple', ''' ' || 'query' || ' ''')))}
)
end
end
Expand All @@ -138,7 +138,7 @@

feature = described_class.new(query, options, columns, Model, normalizer)
expect(feature.conditions.to_sql).to eq(
%{((#{Model.quoted_table_name}.\"tsvector1\" || #{Model.quoted_table_name}.\"tsvector2\") @@ (to_tsquery('simple', ''' ' || 'query' || ' ''')))}
%{((#{Model.quoted_table_name}."tsvector1" || #{Model.quoted_table_name}."tsvector2") @@ (to_tsquery('simple', ''' ' || 'query' || ' ''')))}
)
end
end
Expand Down

0 comments on commit 892eec7

Please sign in to comment.