README.md in unidom-inventory-1.0.4 vs README.md in unidom-inventory-1.0.5
- old
+ new
@@ -136,14 +136,21 @@
```ruby
# lib/unidom.rb
Unidom::Party::Shop.class_eval do
+ include Unidom::Inventory::Concerns::AsStore
+
+end
+
+Unidom::Product::Product.class_eval do
+
include Unidom::Inventory::Concerns::AsStored
end
+
# The Unidom::Inventory::GroupedInventoryItem model & the Unidom::Inventory::SerializedInventoryItem model already include the Unidom::Inventory::Concerns::AsInventoryItem concern
# app/models/your_inventory_item.rb
class YourInventoryItem < ApplicationRecord
include Unidom::Common::Concerns::ModelExtension
@@ -156,9 +163,16 @@
# spec/models/unidom/party/shop_spec.rb
describe Unidom::Party::Shop, type: :model do
it_behaves_like 'Unidom::Inventory::Concerns::AsStore', model_attributes
+
+end
+
+# spec/models/unidom/product/product_spec.rb
+describe Unidom::Product::Product, type: :model do
+
+ it_behaves_like 'Unidom::Inventory::Concerns::AsStored', model_attributes
end
# spec/models/your_inventory_item_spec.rb
describe YourInventoryItem, type: :model do