V
V
Vayladion Gognazdiak2019-09-28 10:51:41
Ruby on Rails
Vayladion Gognazdiak, 2019-09-28 10:51:41

Is normal STI with multiple values ​​in type possible in Rails 5?

Good day.
There is a Product model with the value type="Сd,Вvd,Usb'
Is it possible to do the following without much hassle with this type value?

class Cd < Product end;
class Dvd < Product end;
class Usb < Product end;

Or will I have to mankpatch https://github.com/rails/rails/blob/master/activer... ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question