Sha256: 36486b173318102501c3cdcc4e97dc4e7baa3d9218f5c3acd500d6e4a478d9d1
Contents?: true
Size: 617 Bytes
Versions: 17
Compression:
Stored size: 617 Bytes
Contents
class SetAllPublishableToPublished < ActiveRecord::Migration[5.2] def self.up ActiveRecord::Base.transaction do [ Cmor::Cms::NavigationItem, Cmor::Cms::Page, Cmor::Cms::Partial, Cmor::Cms::Template ].each do |klass| klass.update_all(published_at: Time.zone.now) end end end def down.up ActiveRecord::Base.transaction do [ Cmor::Cms::NavigationItem, Cmor::Cms::Page, Cmor::Cms::Partial, Cmor::Cms::Template ].each do |klass| klass.update_all(published_at: nil) end end end end
Version data entries
17 entries across 17 versions & 1 rubygems