开发者

How do I use Fixtures.identify?

What are 开发者_运维知识库the parameters and what is the significance of them?


Here's a link to the usage.

Returns a consistent, platform-independent identifier for label. Identifiers are positive integers less than 2^32.

# File activerecord/lib/active_record/fixtures.rb, line 531
  def self.identify(label)
  Zlib.crc32(label.to_s) % MAX_ID
end

Also, you might want to check out Machinist, some people say it's easier but I've never used it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜