README.md in unidom-inventory-0.1 vs README.md in unidom-inventory-0.2

- old
+ new

@@ -8,21 +8,41 @@ ## Recent Update Check out the [Road Map](ROADMAP.md) to find out what's the next. Check out the [Change Log](CHANGELOG.md) to find out what's new. + + ## Usage in Gemfile + ```ruby gem 'unidom-inventory' ``` + + ## Run the Database Migration + ```shell rake db:migrate ``` The migration versions start with 200209. + + ## Call the Model ```ruby Unidom::Inventory::SerializedInventoryItem.valid_at.alive.first Unidom::Inventory::GroupedInventoryItem.valid_at.alive.first ``` + + + +## Include the Concerns +```ruby +include Unidom::Inventory::AsInventoryItem +``` + +### As Inventory Item concern +The As Inventory Item concern do the following tasks for the includer automatically: +1. Define the belongs_to :stored macro as: ``belongs_to :stored, polymorphic: true`` +2. Define the belongs_to :store macro as: ``belongs_to :store, polymorphic: true``