Hi all,
I was thinking that someone might want the type column used with Single-Table Inheritance to be an Enum rather than a string. Is the counter argument that STI is responsible for the type column so it doesn’t matter?
If the inheritance_column did support enum, would the resulting code be repeating itself too much?
class User < ActiveRecord::Base
enum type: [:student, :teacher]
end
class Teacher < User
end
class Student < User
end
If there’s interest in this feature I would be happy to work on adding it.
Zac