|
> Tired of `polymorphic` or the infamous `type` column. Well, **NERVER MORE!!!**
|
|
> Tired of `polymorphic` or the infamous `type` column. Well, **NERVER MORE!!!**
|
|
|
|
|
|
This is one great feature from PostgreSQL, the ability of having a table with the most generic data, and then many other tables with the information necessary only for that specifi type of the main one. Rails do allow us to do that, using the `type` attribute, but its biggest problem is that columns from different types ended up getting mixed together. [PostgreSQL Docs](https://www.postgresql.org/docs/9.6/static/ddl-inherit.html)
|
|
This is one great feature from PostgreSQL, the ability to have a table with the most generic data, and then many other tables with the information necessary only for that specific type of the main one. Rails do allow us to do that, using the `type` attribute, but its biggest problem is that columns from different types ended up getting mixed together. [PostgreSQL Docs](https://www.postgresql.org/docs/9.6/static/ddl-inherit.html)
|
|
|
|
|
|
This will allow you do work with inherited models as they are separated tables but yet sharing methods, scopes, validations, and all the other features from all the super models.
|
|
This will allow you to work with inherited models as they are separated tables but yet sharing methods, scopes, validations, and all the other features from all the super models.
|
|
|
|
|
|
**CAUTION** PostgreSQL has some [**caveats**](https://www.postgresql.org/docs/9.1/static/ddl-inherit.html#DDL-INHERIT-CAVEATS) while using this resource. They will be address in later versions of this GEM.
|
|
**CAUTION** PostgreSQL has some [**caveats**](https://www.postgresql.org/docs/9.1/static/ddl-inherit.html#DDL-INHERIT-CAVEATS) while using this resource. They will be addressed in later versions of this GEM.
|
|
|
|
|
|
# How it works
|
|
# How it works
|
|
|
|
|
... | | ... | |