class method
self.identify
Ruby on Rails 3.1.12
Since v3.1.12 Last seen in v3.2.22.5Available in: v3.1.12 v3.2.22.5
Signature
self.identify(label)
Returns a consistent, platform-independent identifier for label. Identifiers are positive integers less than 2^32.
Parameters
-
labelreq
Source
# File activerecord/lib/active_record/fixtures.rb, line 507
def self.identify(label)
Zlib.crc32(label.to_s) % MAX_ID
end
Defined in activerecord/lib/active_record/fixtures.rb line 507
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Fixtures