blob: d36d520a2bd9749003225a5f6536ae66920fa6e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
class BazaarOrder < ApplicationRecord
include DestroyIfZeroQuantity
belongs_to :character
belongs_to :item
validates :price_each, :quantity,
numericality: { greater_than_or_equal_to: 0,
less_than_or_equal_to: 2_000_000_000, only_integer: true }
validates :buy_order, inclusion: { in: [true, false] }
end
|