Multi Table Inheritance with rails 3

前端 未结 3 1249
悲&欢浪女
悲&欢浪女 2020-12-08 22:08

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/mu

相关标签:
3条回答
  • 2020-12-08 22:15

    I recently forked a promising gem to implement multiple table inheritance and class inheritance in Rails. I have spent a few days subjecting it to rapid development, fixes, commenting and documentation and have re-released it as CITIER (Class Inheritance and Table Inheritance Embeddings for Rails).

    Consider giving it a look: https://github.com/PeterHamilton/citier

    It actually takes some concepts from that article you mention.

    0 讨论(0)
  • 2020-12-08 22:20

    For an easy way to do multi-table inheritance take a look at 'acts_as_relation' plugin https://github.com/hzamani/acts_as_relation.

    0 讨论(0)
  • 2020-12-08 22:33

    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

    happy reading

    0 讨论(0)
提交回复
热议问题