Sha256: 5cfed03bb93d35a193306850c01d313c7ee474660601c376acb9bf5298f797bf
Contents?: true
Size: 419 Bytes
Versions: 30
Compression:
Stored size: 419 Bytes
Contents
class FixupDefaultSidebars < ActiveRecord::Migration class BareSidebar < ActiveRecord::Base include BareMigration end def self.up BareSidebar.transaction do BareSidebar.find(:all, :conditions => "staged_position IS NULL").each do |sb| sb.staged_position = sb.active_position; sb.save! end end end def self.down # There's nothing to do in the down step. end end
Version data entries
30 entries across 30 versions & 1 rubygems