Persist and expose via API the progress of the tables arrangement simulations #316

Open
bustikiller wants to merge 5 commits from arrangements-status into main
2 changed files with 4 additions and 3 deletions
Showing only changes of commit dd14a96e98 - Show all commits

View File

@ -9,10 +9,10 @@ class TablesArrangementsController < ApplicationController
render json: TablesArrangement
.order(valid: :desc)
.order(discomfort: :asc)
.select(:id, :name, :discomfort)
.select(:id, :name, :discomfort, :status)
.select("digest = '#{current_digest}'::uuid as valid")
.limit(20)
.as_json(only: %i[id name discomfort valid])
.as_json(only: %i[id name discomfort valid status])
end
def show

View File

@ -19,7 +19,8 @@ RSpec.describe 'tables_arrangements' do
id: { type: :string, format: :uuid },
name: { type: :string },
discomfort: { type: :integer },
valid: { type: :boolean }
valid: { type: :boolean },
status: { type: :string, enum: %w[complete in_progress] }
}
}
xit