diff --git a/ruby_event_store-active_record/lib/ruby_event_store/active_record/event_repository_reader.rb b/ruby_event_store-active_record/lib/ruby_event_store/active_record/event_repository_reader.rb index 87eef89b2a..85ab0cd0e0 100644 --- a/ruby_event_store-active_record/lib/ruby_event_store/active_record/event_repository_reader.rb +++ b/ruby_event_store-active_record/lib/ruby_event_store/active_record/event_repository_reader.rb @@ -58,7 +58,12 @@ def event_in_stream?(event_id, stream) end def search_streams(stream) - @stream_klass.where("lower(stream) LIKE ?", "#{stream.downcase}%").order("position DESC, id DESC").limit(10).pluck(:stream).map { |name| Stream.new(name) } + @stream_klass + .where("lower(stream) LIKE ?", "#{stream.downcase}%") + .order("position DESC, id DESC") + .limit(10) + .pluck(:stream) + .map { |name| Stream.new(name) } end private