class method
self.identify
Ruby on Rails 4.0.13
Since v4.0.13Signature
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 502
def self.identify(label)
Zlib.crc32(label.to_s) % MAX_ID
end
Defined in activerecord/lib/active_record/fixtures.rb line 502
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::FixtureSet