From 3ab31cf4fe083944217b2c49e095d4cb35a482c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Reszke?= Date: Thu, 21 Mar 2024 20:51:09 +0100 Subject: [PATCH] add order to rom its required --- .../lib/ruby_event_store/rom/repositories/stream_entries.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/ruby_event_store-rom/lib/ruby_event_store/rom/repositories/stream_entries.rb b/contrib/ruby_event_store-rom/lib/ruby_event_store/rom/repositories/stream_entries.rb index b9f8ba1b6f..fb507206b0 100644 --- a/contrib/ruby_event_store-rom/lib/ruby_event_store/rom/repositories/stream_entries.rb +++ b/contrib/ruby_event_store-rom/lib/ruby_event_store/rom/repositories/stream_entries.rb @@ -52,6 +52,7 @@ def search_streams(stream_name) .where { stream.like("#{stream_name}%") } .distinct .limit(10) + .order(:stream) .pluck(:stream) .map { |name| Stream.new(name) } end