mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add missing autoload Type
(#31123)
Attribute modules (`Attribute`, `Attributes`, `AttributeSet`) uses `Type`, but referencing `Type` before the modules still fail. ``` % ./bin/test -w test/cases/attribute_test.rb -n test_with_value_from_user_validates_the_value Run options: -n test_with_value_from_user_validates_the_value --seed 31876 E Error: ActiveModel::AttributeTest#test_with_value_from_user_validates_the_value: NameError: uninitialized constant ActiveModel::AttributeTest::Type /Users/kamipo/src/github.com/rails/rails/activemodel/test/cases/attribute_test.rb:233:in `block in <class:AttributeTest>' bin/test test/cases/attribute_test.rb:232 Finished in 0.002985s, 335.0479 runs/s, 335.0479 assertions/s. 1 runs, 1 assertions, 0 failures, 1 errors, 0 skips ``` Probably we need more autoloading at least `Type`.
This commit is contained in:
parent
4528dd6327
commit
24b59434e6
19 changed files with 2 additions and 17 deletions
|
@ -47,6 +47,7 @@ module ActiveModel
|
|||
autoload :SecurePassword
|
||||
autoload :Serialization
|
||||
autoload :Translation
|
||||
autoload :Type
|
||||
autoload :Validations
|
||||
autoload :Validator
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "active_support/core_ext/object/duplicable"
|
||||
require "active_model/type"
|
||||
|
||||
module ActiveModel
|
||||
class Attribute # :nodoc:
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "active_support/core_ext/object/deep_dup"
|
||||
require "active_model/type"
|
||||
require "active_model/attribute_set"
|
||||
require "active_model/attribute/user_provided_default"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
require "cases/helper"
|
||||
require "active_model/attribute_set"
|
||||
require "active_model/type"
|
||||
|
||||
module ActiveModel
|
||||
class AttributeSetTest < ActiveModel::TestCase
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "cases/helper"
|
||||
require "active_model/type"
|
||||
|
||||
module ActiveModel
|
||||
module Type
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "cases/helper"
|
||||
require "active_model/type"
|
||||
|
||||
module ActiveModel
|
||||
module Type
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "cases/helper"
|
||||
require "active_model/type"
|
||||
|
||||
module ActiveModel
|
||||
module Type
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "cases/helper"
|
||||
require "active_model/type"
|
||||
|
||||
module ActiveModel
|
||||
module Type
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "cases/helper"
|
||||
require "active_model/type"
|
||||
|
||||
module ActiveModel
|
||||
module Type
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "cases/helper"
|
||||
require "active_model/type"
|
||||
|
||||
module ActiveModel
|
||||
module Type
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "cases/helper"
|
||||
require "active_model/type"
|
||||
|
||||
module ActiveModel
|
||||
module Type
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "cases/helper"
|
||||
require "active_model/type"
|
||||
|
||||
module ActiveModel
|
||||
module Type
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "cases/helper"
|
||||
require "active_model/type"
|
||||
require "active_support/core_ext/numeric/time"
|
||||
|
||||
module ActiveModel
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "cases/helper"
|
||||
require "active_model/type"
|
||||
|
||||
module ActiveModel
|
||||
module Type
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "cases/helper"
|
||||
require "active_model/type"
|
||||
|
||||
module ActiveModel
|
||||
module Type
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "cases/helper"
|
||||
require "active_model/type"
|
||||
|
||||
module ActiveModel
|
||||
module Type
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "cases/helper"
|
||||
require "active_model/type"
|
||||
|
||||
module ActiveModel
|
||||
module Type
|
||||
|
|
|
@ -104,6 +104,7 @@ module ActiveRecord
|
|||
|
||||
autoload :Result
|
||||
autoload :TableMetadata
|
||||
autoload :Type
|
||||
end
|
||||
|
||||
module Coders
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "active_record/type"
|
||||
require "active_record/connection_adapters/determine_if_preparable_visitor"
|
||||
require "active_record/connection_adapters/schema_cache"
|
||||
require "active_record/connection_adapters/sql_type_metadata"
|
||||
|
|
Loading…
Reference in a new issue