instance method
reload_schema_from_cache
Ruby on Rails edge
Since v5.0.7.2Signature
reload_schema_from_cache(recursive = true)
No documentation comment.
Parameters
-
recursiveopt = true
Source
# File activerecord/lib/active_record/model_schema.rb, line 586
def reload_schema_from_cache(recursive = true)
@schema_hooks_loaded = false
@arel_table = Arel::Table.new(klass: self)
@predicate_builder = PredicateBuilder.new(TableMetadata.new(self, @arel_table)) unless self == Base
@attribute_names = nil
reload_schema_contexts_from_cache
if recursive
subclasses.each do |descendant|
descendant.send(:reload_schema_from_cache)
end
end
end
Defined in activerecord/lib/active_record/model_schema.rb line 586
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ModelSchema::ClassMethods