Closed vladfaust closed 5 years ago
This is tricky, because table is defined in class-level annotation like this:
@[Onyx::SQL::Model::Options(table: "users")] class User end
One option is to make Model.schema macro define .table class method.
Model.schema
.table
This works, though :sweat_smile:
class User def table "users" end end user = uninitialized User pp user.table
This is tricky, because table is defined in class-level annotation like this:
One option is to make
Model.schema
macro define.table
class method.