Skip to content

Instantly share code, notes, and snippets.

View benalavi's full-sized avatar
✌️

Ben Alavi benalavi

✌️
View GitHub Profile
diff --git a/lib/sequel/plugins/class_table_inheritance.rb b/lib/sequel/plugins/class_table_inheritance.rb
index 6c8af1697..c48a2a779 100644
--- a/lib/sequel/plugins/class_table_inheritance.rb
+++ b/lib/sequel/plugins/class_table_inheritance.rb
@@ -283,7 +283,7 @@ module Sequel
if table = cti_table_map[n.to_sym]
columns = db.schema(table).map(&:first)
else
- table = if cti_qualify_tables && (schema = dataset.schema_and_table(table_name).first)
+ table = if cti_qualify_tables && (schema = dataset.schema_and_table(cti_table_name).first)
require "sequel"
DB = Sequel.sqlite
DB.create_table :albums do
primary_key :id
column :title, :text
end
DB.create_table :artists do