sql generated uses a column of tracked_attribute_id rather than title_id and subtitle_id so there is an SQL error since that column doesn't exist on the table.
I seemed to fix it in callsite.rb using primary_key_name rather than association_foreign_key; but, not sure that won't affect other belongs_to use cases.
def essential_columns(model_class)
model_class.reflect_on_all_associations.inject([@primary_key]) do |arr, assoc|
if assoc.options[:dependent] && assoc.macro == :belongs_to
arr << assoc.primary_key_name
end
arr
end
end
model belongs_to :title, :class_name => "TrackedAttribute", :dependent => :destroy belongs_to :subtitle, :class_name => "TrackedAttribute", :dependent => :destroy
sql generated uses a column of tracked_attribute_id rather than title_id and subtitle_id so there is an SQL error since that column doesn't exist on the table.
I seemed to fix it in callsite.rb using primary_key_name rather than association_foreign_key; but, not sure that won't affect other belongs_to use cases.