Single Table Inheritance
What is Single Table Inheritance ? Single Table Inheritance is a mechanism through which ActiveRecord can share fields and behavior between different models. For eg. let’s say we need to create a model vehicle and car. Since vehicle and car will share their attributes and methods we can use Single Table Inheritance on them. Let’s generate vehicles model and a cars model with vehicles as its parent: rails generate model vehicle type:string color:string price:decimal{10....