Sha256: 9d4f7f5b6e3a9ff527bc2066c45125c33fdd67d53c013c9bfb90e5dbaf4f4f2d
Contents?: true
Size: 640 Bytes
Versions: 7
Compression:
Stored size: 640 Bytes
Contents
# -*- encoding : utf-8 -*- class ImportHelpText < ActiveRecord::Migration include Wagn::MigrationHelper def up contentedly do # generated JSON from template db with this url: /*help+*right+by_name.json?view=core&pretty=true json = File.read( File.join Wagn.gem_root, 'db/migrate_cards/data/1.11_help_text.json' ) data = JSON.parse json Rails.logger.info "parsed!" data.each do |atom| c = atom['card'] Card.merge c['name'], { :type=>c['type'], :content=>atom['views'][0]['parts'] }, :pristine=>true end end end def down contentedly do end end end
Version data entries
7 entries across 7 versions & 1 rubygems