instance method
freeze
Ruby on Rails 6.0.6
Since v4.0.13Signature
freeze()
Clone and freeze the attributes hash such that associations are still accessible, even on destroyed records, but cloned models will not be frozen.
Source
# File activerecord/lib/active_record/core.rb, line 467
def freeze
@attributes = @attributes.clone.freeze
self
end
Defined in activerecord/lib/active_record/core.rb line 467
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Core