Skip to content

Commit 43a9832

Browse files
pirjbbatsov
authored andcommitted
Adjust Named Placeholder not to interfere with Where with Ranges
1 parent e4214dd commit 43a9832

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -870,14 +870,14 @@ Consider using named placeholders instead of positional placeholders when you ha
870870
----
871871
# okish
872872
Client.where(
873-
'created_at >= ? AND created_at <= ?',
874-
params[:start_date], params[:end_date]
873+
'orders_count >= ? AND country_code = ?',
874+
params[:min_orders_count], params[:country_code]
875875
)
876876
877877
# good
878878
Client.where(
879-
'created_at >= :start_date AND created_at <= :end_date',
880-
start_date: params[:start_date], end_date: params[:end_date]
879+
'orders_count >= :min_orders_count AND country_code = :country_code',
880+
min_orders_count: params[:min_orders_count], country_code: params[:country_code]
881881
)
882882
----
883883

0 commit comments

Comments
 (0)