Top "Sti" questions

Single Table Inheritance - a mechanism to add the principle of object-oriented inheritance onto relational database models by having child classes map onto the same table as their ancestors.

Implementing Abstract Base Model Class, the Rails Way™

I have a Book and Download model that share many attributes, so my goal is to inherit the common attributes …

ruby-on-rails activerecord inheritance abstract-class sti
Rails STI: How to change mapping between class name & value of the 'type' column

Because of company rules I can't use our domain class names; I am going to use an analogy instead. I …

ruby-on-rails types single-table-inheritance sti
Multi Table Inheritance with rails 3

Are there standards or best practices yet when it comes to multi table inheritance in rails 3? So far the best …

ruby-on-rails multiple-tables sti
Testing simple STI with FactoryGirl

I have got a class, that is the base of some other classes that specializes the behavior: class Task < …

ruby-on-rails ruby rspec factory-bot sti
Prevent STI when inheriting from an ActiveRecord model

On Rails 3.2.6, I have a class that inherits from ActiveRecord::Base: class Section < ActiveRecord::Base ... end When I inherit …

ruby-on-rails ruby sti
Rails STI association with subclasses

I'm getting some strange behaviour when fetching collections from a has_many association with rails 3 when using STI. I have: …

sql ruby-on-rails activerecord sti
Rails Question: belongs_to with STI -- how do i do this correctly?

I've been playing around with STI and belongs_to / has_many relationships and I'm a bit confused. I have a …

ruby-on-rails ruby-on-rails-3 has-many single-table-inheritance sti