Sha256: db3cdfca562793878abfe2a0b26ac34b4162fda5fb574f225d90254b500f8852

Contents?: true

Size: 583 Bytes

Versions: 7

Compression:

Stored size: 583 Bytes

Contents

# -*- encoding : utf-8 -*-

class UpdateStylesheets < ActiveRecord::Migration
  include Wagn::MigrationHelper
  def up
    contentedly do
      dir = "#{Wagn.gem_root}/db/migrate_cards/data/1.12_stylesheets"
      %w{ common traditional }.each do |sheetname|
        card = Card["style: #{sheetname}"]
        if card && card.pristine?
          card.update_attributes! :content=>File.read("#{dir}/#{sheetname}.scss")
        end
      end
      
      if c = Card['*all+*style+file']
        c.delete!
      end
    end
  end

  def down
    contentedly do
      
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wagn-1.12.13 db/migrate_cards/20130920291703_update_stylesheets.rb
wagn-1.12.12 db/migrate_cards/20130920291703_update_stylesheets.rb
wagn-1.12.11 db/migrate_cards/20130920291703_update_stylesheets.rb
wagn-1.12.10 db/migrate_cards/20130920291703_update_stylesheets.rb
wagn-1.12.9 db/migrate_cards/20130920291703_update_stylesheets.rb
wagn-1.12.8 db/migrate_cards/20130920291703_update_stylesheets.rb
wagn-1.12.7 db/migrate_cards/20130920291703_update_stylesheets.rb