Given a STI parent model
class CustomForm < ApplicationRecord
has_many :templates`
end
with a couple of subclasses that should have many templates. Why would the template class below:
class FormTemplate < ApplicationRecord
belongs_to :custom_form
Why would Rails expect the FormTemplate to have a custom_form_type column defined?
All you need is the custom_form_id.
this was working before and even passes my CI but I did some other work that seems to have broken it :disappointed:
Here is the error:
PG::UndefinedColumn: ERROR: column form_templates.custom_form_type does not exist
LINE 1: ...CT “form_templates”.* FROM “form_templates”