Rails 3 协会。具有多个单词模型的 HABTM 的迁移
我正在 line_items 和税收之间创建 HABTM 关联。
关联表的名称应该叫什么?行项目税?
I'm creating a HABTM association between line_items and taxes.
What would the name of the association table be called? line_items_taxes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Rails 期望连接表按“字母顺序”命名:
因此,它将被称为
line_items_taxes
。您可以在模型中覆盖此行为。Rails expects that the Join Table is named "alphabetically":
As such, it would be called
line_items_taxes
. You can override this behavior in the model.