product_rails 0.1.2 → 0.1.3

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: bd92ebb4f254767e759e5edd4831023af1b50d78
4
- data.tar.gz: 325d3ef23986f243d390edced3cf94ffec916e5a
3
+ metadata.gz: ceec1193362623cdb4f3c842cd687bee7786c208
4
+ data.tar.gz: daf00d32a67500eb1100947a14e8d26bad5fde71
5
5
  SHA512:
6
- metadata.gz: bf8ed84ec9541f219c224dfb983e370b83677eb722115ace76c5092500cb89832328e947695f68e034e6ac1b9119a765de9b35fb27495a5fb5b9775547f2d0f5
7
- data.tar.gz: 41eafdbaf546587c51a517ef77227fdb03cddd2808427d2dfc333b91c4a12c5d08e49b59b19b9e36943c723692e2d9ac56a9a7e5ad10d198ddd855de588da25f
6
+ metadata.gz: a02449f0cd1b77598c87ab3193a936bf42d13066a2e8745199dbbd55a7800456ed7123feb5b2b24b432eca0b1fae694e3082caa84f5145dd2eda14eedf400af3
7
+ data.tar.gz: 12036e2531755e2109ac391cf9c334bb7e9c8d32717107a45025cc1cc7088fcb7de5de6ecf75e61ff72f38fec8b42d6cf031ee6d285b90904ccd72422eac83a8
@@ -3,10 +3,10 @@ class Product < ActiveRecord::Base
3
3
 
4
4
  extend FriendlyId
5
5
 
6
- validates :sku, :name, :description, :unity, :stock, :min_stock, :weight, presence: true
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, :wheight, numericality: {greater_than_or_equal_to: 0}
9
+ validates :price, :tax, :weight, numericality: {greater_than_or_equal_to: 0}
10
10
 
11
11
  friendly_id :slug_candidates, use: [:slugged, :finders]
12
12
 
@@ -0,0 +1,6 @@
1
+ class ChangeProductWeightAndDescriptionToAllowNull < ActiveRecord::Migration
2
+ def change
3
+ change_column_null :products, :description, true
4
+ change_column_null :products, :weight, true
5
+ end
6
+ end
@@ -1,3 +1,3 @@
1
1
  module ProductRails
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: product_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orgânica Digital
@@ -66,6 +66,7 @@ files:
66
66
  - db/migrate/20150206104816_create_products.rb
67
67
  - db/migrate/20150209192603_rename_product_wheight_to_weight.rb
68
68
  - db/migrate/20150210130905_change_product_decription_column_to_text.rb
69
+ - db/migrate/20150210155118_change_product_weight_and_description_to_allow_null.rb
69
70
  - lib/product_rails.rb
70
71
  - lib/product_rails/engine.rb
71
72
  - lib/product_rails/version.rb