Sha256: 77fc38bbbf3647b0f396d95643af9665137bc433cac7a0d4b8cf6a74f453f2d8

Contents?: true

Size: 532 Bytes

Versions: 4

Compression:

Stored size: 532 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

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wagn-1.13.0 db/migrate_cards/20130920291703_update_stylesheets.rb
wagn-1.13.0.pre2 db/migrate_cards/20130920291703_update_stylesheets.rb
wagn-1.13.0.pre1 db/migrate_cards/20130920291703_update_stylesheets.rb
wagn-1.13.0.pre db/migrate_cards/20130920291703_update_stylesheets.rb