spree/spree — pull request #2789 by sohara (2013-03-30 19:14:14+00:00)
Title: Skip :after callbacks and user private send in CreateDefaultStock migration so it can run

Skip :after callbacks on StockLocation and StockItem when creating
intitial instances. Use private send to set StockItem.count_on_hand
because :count_on_hand= is now private.

These changes are necessary because of changes to the models that I presume were made after the migrations were coded.

The private send is necessary because of [this commit](https://github.com/spree/spree/commit/9acf57f6baf55993ca0f4f032e9b7ad684712c9b).

Skipping :after callbacks on StockLocation is required due to [this commit](https://github.com/spree/spree/commit/0ba60a08f934af9d6a7f17f6e9c90a1749547e9b).

Skipping :after callbacks on StockItem is required due to [this commit](https://github.com/spree/spree/commit/630afbb7f2549556fb1bc914e16a2e3802cc8f15).

I'm not sure if the changes I've made are the best way to work around these issues, but the migration now runs without raising any errors.