Sha256: bad53a52c38198e444e8c1dc2987ec91a5c3aa8e8adf91b7745ca23ff798737c
Contents?: true
Size: 450 Bytes
Versions: 4
Compression:
Stored size: 450 Bytes
Contents
# -*- encoding : utf-8 -*- class ImportHelpText < ActiveRecord::Migration include Wagn::MigrationHelper def up contentedly do json = File.read( File.join Wagn.gem_root, 'db/migrate_cards/data/1.11_help_text.json' ) data = JSON.parse json data.each do |atom| c = atom['card'] Card.merge c['name'], { :type=>c['type'], :content=>atom['views'][0]['parts'] }, :pristine=>true end end end end
Version data entries
4 entries across 4 versions & 1 rubygems