带导轨的多表继承 3 [英] Multi Table Inheritance with rails 3

查看:40
本文介绍了带导轨的多表继承 3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当涉及到 rails 3 中的多表继承时,是否有标准或最佳实践?到目前为止,我能找到的最好的文章是:

Are there standards or best practices yet when it comes to multi table inheritance in rails 3? So far the best article I could find was:

http://mediumexposure.com/multiple-table-inheritance-active-record/

但即使这样也需要一些更改(例如,将 requires 移动到初始值设定项而不是旧的/config/environment.rb)

But even that needed some changes(e.g. moving the requires to an initializer instead of the old /config/environment.rb)

有更好的资源/标准吗?

Any better resources / standards?

推荐答案

我参加的墨尔本 Ruby 小组中有一个人写了几篇关于 Rails 中表继承的博客,这些评论也很有帮助.它不是专门针对 Rails 3,但肯定有一些不错的指针.

There's a guy in the Melbourne Ruby group I attend that's written a couple of blogs on table inheritance in rails and the comments are really helpful as well. It's not specifically Rails 3 but there's definitely some decent pointers in there.

http://rhnh.net/2010/08/15/class-table-inheritance-and-eager-loading

http://rhnh.net/2010/07/02/3-reasons-why-you-should-not-use-single-table-inheritance

祝您阅读愉快

这篇关于带导轨的多表继承 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆