mountetna / magma

Data server with friendly data loaders
GNU General Public License v2.0
5 stars 2 forks source link

Automatically configure Magma::Attribute single table inheritance plugin #183

Closed alimi closed 4 years ago

alimi commented 4 years ago

The plugin is currently configured manually in a model_map:

https://github.com/mountetna/magma/blob/c3e5ff98a2150acca518d23237ac1ce432bb4390/lib/magma/attribute.rb#L1-L18

When attributes are added or removed, we also have to remember to add or remove them in this model_map. Nothing errors if it gets out of date, so it's easy to forget about.

It'd be nice if the plugin/model_map could be configured automatically.

http://sequel.jeremyevans.net/rdoc-plugins/classes/Sequel/Plugins/SingleTableInheritance.html