添加递增递减函数的最佳方法是什么
我正在尝试构建一个应用程序来移动股票。我有产品和存储。我希望能够将 X 数量的产品从存储 A 移动到存储 B。我想我需要一些信用/提款功能来更新一侧的增量数量并减少另一侧的数量。
您对 Rails 的态度是什么?我还需要找出将处理所有事务的中间人,因为我不确定数据库关系。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 ActiveRecord::Transactions
Use ActiveRecord::Transactions