From 67fed6015ca0722f38199e9b713f1bbcee298257 Mon Sep 17 00:00:00 2001 From: Andrew Sparkes Date: Mon, 13 Jan 2025 16:19:59 +0000 Subject: [PATCH] added find_all method for tube rack --- app/sequencescape/sequencescape/api/v2/tube_rack.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/sequencescape/sequencescape/api/v2/tube_rack.rb b/app/sequencescape/sequencescape/api/v2/tube_rack.rb index 849b97853..5c07bb1a8 100644 --- a/app/sequencescape/sequencescape/api/v2/tube_rack.rb +++ b/app/sequencescape/sequencescape/api/v2/tube_rack.rb @@ -60,6 +60,10 @@ def self.find_by(params) Sequencescape::Api::V2::TubeRack.includes(*includes).find(**options).first end + def self.find_all(options, includes: DEFAULT_INCLUDES) + Sequencescape::Api::V2::TubeRack.includes(*includes).where(**options).all + end + # This method sorts the racked tubes by their coordinate, taking into account both row and column parts. # Sorts by column first and then by row. #