product_rails 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: ceec1193362623cdb4f3c842cd687bee7786c208
4
- data.tar.gz: daf00d32a67500eb1100947a14e8d26bad5fde71
3
+ metadata.gz: 43590aca3c2fb88a3fe895cf4ab0876ce356aa36
4
+ data.tar.gz: 9b4d1f25cf355132959e4ffb0911797d40ee8e6e
5
5
  SHA512:
6
- metadata.gz: a02449f0cd1b77598c87ab3193a936bf42d13066a2e8745199dbbd55a7800456ed7123feb5b2b24b432eca0b1fae694e3082caa84f5145dd2eda14eedf400af3
7
- data.tar.gz: 12036e2531755e2109ac391cf9c334bb7e9c8d32717107a45025cc1cc7088fcb7de5de6ecf75e61ff72f38fec8b42d6cf031ee6d285b90904ccd72422eac83a8
6
+ metadata.gz: 08f5abb42dd0620b965be3dd3f8cd24a857adb6cb1fcaa44e47e9332b2b620bebd8e53f74242504ab45de333eba8707b2d3228eb35aec3b235aea18286882c83
7
+ data.tar.gz: cc759e7a65f96df257b91790b4bc8fdcf5278494dba73ec516e67700ae4b2dde3b956ccc71ae0c818d8142646b948d7f4691725c75dff6984870c8ffcc492ea9
@@ -6,7 +6,9 @@ class Product < ActiveRecord::Base
6
6
  validates :sku, :name, :unity, :stock, :min_stock, presence: true
7
7
  validates :sku, uniqueness: true
8
8
  validates :stock, :min_stock, numericality: {only_integer: true}
9
- validates :price, :tax, :weight, numericality: {greater_than_or_equal_to: 0}
9
+ validates :price, numericality: {greater_than_or_equal_to: 0}, allow_nil: true
10
+ validates :tax, numericality: {greater_than_or_equal_to: 0}, allow_nil: true
11
+ validates :weight, numericality: {greater_than_or_equal_to: 0}, allow_nil: true
10
12
 
11
13
  friendly_id :slug_candidates, use: [:slugged, :finders]
12
14
 
@@ -1,3 +1,3 @@
1
1
  module ProductRails
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: product_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orgânica Digital
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-10 00:00:00.000000000 Z
11
+ date: 2015-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails