Sha256: 1c50bcf6da91de863a2ae084cde2615fac5ed585d85d2cb2d5ab57ed4dc4361d

Contents?: true

Size: 443 Bytes

Versions: 3

Compression:

Stored size: 443 Bytes

Contents

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

class UpdateStylesheets < Wagn::Migration
  def up
    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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wagn-1.14.0.pre3 db/migrate_cards/20130920291703_update_stylesheets.rb
wagn-1.14.0.pre2 db/migrate_cards/20130920291703_update_stylesheets.rb
wagn-1.14.0.pre1 db/migrate_cards/20130920291703_update_stylesheets.rb