Ask for Help
“Has anyone implemented mutli-table (class table) inheritance in Rails, as apposed to single table inheritance (STI)?”
- There are some plugins that nobody has tried, such as inherits_from
- What about a view to represent the super set of tables and rows?
“We’re looking for a dead-simple, drop-in JS rating or ‘starting’ plugin.”
Check out the start-rating jQuery plugin. Any other suggestions?
http://github.com/sava/class_table_inheritance/tree/master
“Keep in mind that only PostgreSQL is currently supported”
June 23, 2009 at 10:01 pm
The star-rating jQuery plugin from fyneworks is awesome, but it will barf on the standard form field names that Rails uses, i.e.
mymodel[myfield]
My fork fixes that issue.
http://github.com/raskchanky/star-rating/tree/master
June 23, 2009 at 10:52 pm
For multi-table inheritance in Rails, all you have to do is adding this line in the parent class : self.abstract_class = true. I’m doing that for a personal project. The code is on github : http://github.com/nono/linuxfr.org/blob/64703d1b97f5ac90fbf7fa42289a9f65972d64fe/app/models/content.rb.
June 24, 2009 at 8:54 am