I recently upgraded to rails 5.2 and now I am getting an error in one of my models because the belongs_to method isn't being inherited by one of the subclass. Am I missing something obvious?
class B < A
  belongs_to :x
  belongs_to :y
end
class A < ApplicationRecord
  belongs_to :z
end
Error:
D#test_should_get_new:
ActionView::Template::Error: undefined method `belongs_to' for B:Class
    app/models/B.rb:2:in `<class:QcQpcrSampleTest>'
    app/models/B.rb:1:in `<top (required)>'
    app/views/D/_form.erb:45:in `block (2 levels) in _app_views_D__form_erb___2546218964114172504_70133388141640'
    app/views/D/_form.erb:22:in `block in ...
    app/controllers/application_controller.rb:78:in `set_time_zone'
    test/controllers/D_test.rb:12:in `block in <class:DTest>'
 
    