I have a table in my database called providers
with a type column called provider_type
. provider_type
can be either of the following:
- center
- sponsor
I want to create a class that inherits from Sequel::Model
called Center
and one called Sponsor
, the resulting methods for which will scope all queries for the respective class by provider_type = 'center'
or provider_type = 'sponsor'
.
It's not 100% essential that I be able to do this but if it is possible, it would be ideal.