77ca2815f5
previously the tests with and without a custom `inheritance_column` used the same models. Since the model then has both fields this can lead to false positives.
25 lines
338 B
Ruby
25 lines
338 B
Ruby
class Vegetable < ActiveRecord::Base
|
|
|
|
validates_presence_of :name
|
|
|
|
def self.inheritance_column
|
|
'custom_type'
|
|
end
|
|
end
|
|
|
|
class Cucumber < Vegetable
|
|
end
|
|
|
|
class Cabbage < Vegetable
|
|
end
|
|
|
|
class GreenCabbage < Cabbage
|
|
end
|
|
|
|
class KingCole < GreenCabbage
|
|
end
|
|
|
|
class RedCabbage < Cabbage
|
|
belongs_to :seller, :class_name => 'Company'
|
|
end
|