Creating a base class with customized table names for all subclasses #2216
Closed
davetron5000
started this conversation in
General
Replies: 2 comments
-
You want to override the |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ah, that worked, thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to make a base class for a
Sequel::Model
that does two things:I know this isn't the right code, but conceptually:
The base class part is no problem:
I can't figure out how to change the table name "algorithm". I tried implementing
inherited
and callingset_dataset
in there, but that causedundefined method
internal_name=' for an instance of DataModel::EntitlementDefault` which told me that I should not have done what I did.So, question is - how might I do this?
Let's set aside if this is a good idea or not, just looking to understand how it can be done.
Beta Was this translation helpful? Give feedback.
All reactions