cats_core 1.1.10 → 1.1.11
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbc34455b593fd71880ccf827b6d2e3c9aea723471d877780d4f44b18297cb92
|
4
|
+
data.tar.gz: f2867e4a074fe84990e005a845844f06a3433e6fed52d9e56f12eb5943c061ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13a7abd31cdaa640da8486fb394b7896e919c79229233fdee4f8fd5ebae5498f55987ba72f30189486812a9273be8efe4e246cd2bd9d410f32996bee1deff037
|
7
|
+
data.tar.gz: e9dafd860e39d9751a6ddade1adf4d6df4373c37c38f4e267ed2056b1eef7e756a1a29b4b44d62907329348e1a8d8e8d7998e4bd92d78baf2564e6ffc0daf7a6
|
@@ -3,8 +3,9 @@ module Cats
|
|
3
3
|
class RhnRequest < ApplicationRecord
|
4
4
|
belongs_to :commodity
|
5
5
|
|
6
|
-
validates :reference_no, :request_date, presence: true
|
6
|
+
validates :reference_no, :request_date, :quantity, presence: true
|
7
7
|
validates :reference_no, uniqueness: true
|
8
|
+
validates :quantity, numericality: { greater_than: 0 }
|
8
9
|
|
9
10
|
delegate(:batch_no, to: :commodity, prefix: true)
|
10
11
|
end
|
@@ -6,6 +6,7 @@ class CreateCatsCoreRhnRequests < ActiveRecord::Migration[6.1]
|
|
6
6
|
null: false,
|
7
7
|
index: { name: 'commodity_on_rhn_indx' },
|
8
8
|
foreign_key: { to_table: :cats_core_commodities }
|
9
|
+
t.float :quantity, null: false
|
9
10
|
t.date :request_date, null: false
|
10
11
|
t.string :requested_by
|
11
12
|
|
data/lib/cats/core/version.rb
CHANGED