publiclyidentify batches

This commit is contained in:
24c02 2025-12-11 16:37:22 -05:00
parent 7ef1cb8203
commit f2acb68255
2 changed files with 4 additions and 1 deletions

View file

@ -10,6 +10,9 @@ module Public
when "pkg"
@record = Warehouse::Order.find_by_public_id!(params[:public_id])
redirect_to public_package_path(@record)
when "bat"
@record = Batch.find_by_public_id!(params[:public_id])
redirect_to batch_path(@record)
else
raise ActiveRecord::RecordNotFound, "no record found with public_id: #{params[:public_id]}"
end

View file

@ -45,7 +45,7 @@
class Batch < ApplicationRecord
include AASM
include PublicIdentifiable
set_public_id_prefix "batch"
set_public_id_prefix "bat"
include Taggable