mirror of
https://github.com/System-End/theseus.git
synced 2026-04-19 16:38:18 +00:00
publiclyidentify batches
This commit is contained in:
parent
7ef1cb8203
commit
f2acb68255
2 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
class Batch < ApplicationRecord
|
||||
include AASM
|
||||
include PublicIdentifiable
|
||||
set_public_id_prefix "batch"
|
||||
set_public_id_prefix "bat"
|
||||
|
||||
include Taggable
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue