instance method
freeze
Ruby on Rails edge
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 668
def freeze
@attributes = @attributes.clone.freeze
self
end
Defined in activerecord/lib/active_record/core.rb line 668
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Core