diff --git a/lib/enumerations/version.rb b/lib/enumerations/version.rb index 8005895..7c019fc 100644 --- a/lib/enumerations/version.rb +++ b/lib/enumerations/version.rb @@ -1,3 +1,3 @@ module Enumerations - VERSION = '2.6.0'.freeze + VERSION = '2.5.4'.freeze end diff --git a/test/configuration/enumerations_test.rb b/test/configuration/enumerations_test.rb index f4a49b5..cf126e2 100644 --- a/test/configuration/enumerations_test.rb +++ b/test/configuration/enumerations_test.rb @@ -49,13 +49,13 @@ def test_enumerated_class_scope_hash_value end def test_enumerations_overrides - assert_equal :id, OveridableStatus.primary_key - assert_equal :id, OveridableStatus.foreign_key_suffix + assert_equal :id, OverridableStatus.primary_key + assert_equal :id, OverridableStatus.foreign_key_suffix - model = OveridableModel.new - model.overidable_status = OveridableStatus.draft + model = OverridableModel.new + model.overridable_status = OverridableStatus.draft - assert_equal 1, model.overidable_status_id + assert_equal 1, model.overridable_status_id end end end diff --git a/test/helpers/database_helper.rb b/test/helpers/database_helper.rb index 8ae2eb6..0100473 100644 --- a/test/helpers/database_helper.rb +++ b/test/helpers/database_helper.rb @@ -18,7 +18,7 @@ t.integer :custom_enum end - create_table :overidable_models, force: true do |t| - t.integer :overidable_status_id + create_table :overridable_models, force: true do |t| + t.integer :overridable_status_id end end diff --git a/test/helpers/test_helper.rb b/test/helpers/test_helper.rb index de2d8ba..61d8b65 100644 --- a/test/helpers/test_helper.rb +++ b/test/helpers/test_helper.rb @@ -41,13 +41,13 @@ class User < ActiveRecord::Base enumeration :status end -class OveridableStatus < Enumerations::Base +class OverridableStatus < Enumerations::Base self.primary_key = :id self.foreign_key_suffix = :id value :draft, id: 1 end -class OveridableModel < ActiveRecord::Base - enumeration :overidable_status +class OverridableModel < ActiveRecord::Base + enumeration :overridable_status end