Created
September 21, 2011 06:23
-
-
Save arulprasad/1231394 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s = Store.find_by_code('landscape'); inventories = Item.where("id NOT IN (?)", s.inventories.collect(&:item_id)).collect {|i| s.inventories.create!(:item_id => i.id, :quantity => 100) }; inventories.class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment