method

load_schema!

Importance_0
v5.0.0.1 - Show latest stable - 0 notes - Class: ClassMethods
load_schema!() private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/model_schema.rb, line 353
      def load_schema!
        @columns_hash = connection.schema_cache.columns_hash(table_name).except(*ignored_columns)
        @columns_hash.each do |name, column|
          warn_if_deprecated_type(column)
          define_attribute(
            name,
            connection.lookup_cast_type_from_column(column),
            default: column.default,
            user_provided_default: false
          )
        end
      end
Register or log in to add new notes.