app/queries/decidim/proposals/similar_proposals.rb in decidim-proposals-0.25.2 vs app/queries/decidim/proposals/similar_proposals.rb in decidim-proposals-0.26.0.rc1
- old
+ new
@@ -29,10 +29,10 @@
Decidim::Proposals::Proposal
.where(component: @components)
.published
.not_hidden
.where(
- "GREATEST(#{title_similarity}, #{body_similarity}) >= ?",
+ Arel.sql("GREATEST(#{title_similarity}, #{body_similarity}) >= ?").to_s,
*similarity_params,
Decidim::Proposals.similarity_threshold
)
.limit(Decidim::Proposals.similarity_limit)
end