How (and whether) to populate rails application with initial data

后端 未结 13 1739
隐瞒了意图╮
隐瞒了意图╮ 2020-12-04 05:43

I\'ve got a rails application where users have to log in. Therefore in order for the application to be usable, there must be one initial user in the system for the first pe

13条回答
  •  时光说笑
    2020-12-04 06:21

    Great blog post on this: http://railspikes.com/2008/2/1/loading-seed-data

    I was using Jay's suggestions of a special set of fixtures, but quickly found myself creating data that wouldn't be possible using the models directly (unversioned entries when I was using acts_as_versioned)

提交回复
热议问题