diff --git a/lib/ancestry/class_methods.rb b/lib/ancestry/class_methods.rb index 58abbeae..514a9b2f 100644 --- a/lib/ancestry/class_methods.rb +++ b/lib/ancestry/class_methods.rb @@ -200,15 +200,5 @@ def rebuild_depth_cache! def unscoped_where yield self.ancestry_base_class.unscope(:where) end - - ANCESTRY_UNCAST_TYPES = [:string, :uuid, :text].freeze - - def primary_key_is_an_integer? - if defined?(@primary_key_is_an_integer) - @primary_key_is_an_integer - else - @primary_key_is_an_integer = !ANCESTRY_UNCAST_TYPES.include?(type_for_attribute(primary_key).type) - end - end end end diff --git a/test/concerns/has_ancestry_test.rb b/test/concerns/has_ancestry_test.rb index b48aa000..26f1fa78 100644 --- a/test/concerns/has_ancestry_test.rb +++ b/test/concerns/has_ancestry_test.rb @@ -123,16 +123,4 @@ def test_setup_test_nodes end end end - - def test_primary_key_is_an_integer - AncestryTestDatabase.with_model(extra_columns: { string_id: :string }) do |model| - model.primary_key = :string_id - - assert !model.primary_key_is_an_integer? - end - - AncestryTestDatabase.with_model do |model| - assert model.primary_key_is_an_integer? - end - end end