Sha256: ba440610cfda1e54f7ae7a83335eedb903f030a04a6a8b830c4326dc3582ad86
Contents?: true
Size: 342 Bytes
Versions: 3
Compression:
Stored size: 342 Bytes
Contents
class ChangeCreatedAt < ActiveRecord::Migration def up day = 1 NobelPrizeWinner.all.in_groups(3, false) do |group| seconds = 1 group.each do |npw| npw.update_attribute(:created_at, "201201#{'%02i' % day}1201#{'%02i' % seconds}") seconds += 1 end day += 1 end end def down end end
Version data entries
3 entries across 3 versions & 1 rubygems