0

I'm trying to build an app to move stocks around. I have products and storages. I want to be able to move X count of products from storage A to storage B. I guess I need some credit/withdraw function to update increment quantity on one side and decrement on the other side.

What would be your approach with Rails? I need to figure out the middleman too that will handle all transactions as I'm not sure with Db relationship.

Gaelle
  • 599
  • 2
  • 6
  • 24

1 Answers1

1

Use ActiveRecord::Transactions

sethvargo
  • 26,739
  • 10
  • 86
  • 156