This is my recent project where is started to use STI for extend my Ad
model. I never before used STI and many people which i recently discuss
not recommended me to use this method.
What are the advantages and disadvanteges of STI and why i should use
And how in delegation i can separate validation like below?
Ride coordination board: Singe Table Inheritance
Model: regular AD
Model: Ride AD
class Ad < ActiveRecord::Base
validates_presence_of :name, :email, :price
validates_presence_of :title, :ad_content, if: is_regular?
validates_presence_of :from, :to, unless: is_regular?
class RideAd < Ad