custom primary key for transaction

This commit is contained in:
Min Zeya Phyo
2017-06-04 16:27:14 +06:30
parent 394d2ed938
commit 4fc511d531
19 changed files with 88 additions and 55 deletions

View File

@@ -1,4 +1,11 @@
class CashierLoginLog < ApplicationRecord
before_create :generate_custom_id
belongs_to :cashier_station
belongs_to :employee
private
def generate_custom_id
self.cashier_login_log_id = SeedGenerator.generate_id(self.class.name, "CLO")
end
end