From f34e1d1972b014df0c8aebf002b5db61c4edd927 Mon Sep 17 00:00:00 2001 From: pvincent Date: Sun, 22 Sep 2024 12:35:45 +0400 Subject: [PATCH] limit 1 useless --- lib/semantic/subscribers/active_record.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/semantic/subscribers/active_record.rb b/lib/semantic/subscribers/active_record.rb index e8278bf..00dc35a 100644 --- a/lib/semantic/subscribers/active_record.rb +++ b/lib/semantic/subscribers/active_record.rb @@ -67,6 +67,7 @@ module Semantic bounds.map { |b| boolean_or_numeric?(b) ? b.to_s : "'#{b}'" } .each_with_index { |sb, index| statement.gsub!("$#{index + 1}", sb) } + statement.gsub!(/ LIMIT 1$/, '') # LIMIT 1 is useless! statement end