Commit 2c35a499 by ivan Lan

Improve custom_hash_column

parent 507a69ba
...@@ -38,7 +38,7 @@ module Shotengai ...@@ -38,7 +38,7 @@ module Shotengai
after_create :set_seq after_create :set_seq
custom_hash_columns :spec, :meta custom_hash_columns :spec
include AASM_DLC include AASM_DLC
aasm column: :status do aasm column: :status do
......
...@@ -36,7 +36,7 @@ module Shotengai ...@@ -36,7 +36,7 @@ module Shotengai
validate :check_remark validate :check_remark
validates :count, numericality: { only_integer: true, greater_than: 0 } validates :count, numericality: { only_integer: true, greater_than: 0 }
custom_hash_columns :spec, :meta, :detail, :remark custom_hash_columns :spec, :remark
validate :cannot_edit, if: :order_was_paid validate :cannot_edit, if: :order_was_paid
before_destroy :cannot_edit, if: :order_was_paid before_destroy :cannot_edit, if: :order_was_paid
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment