Sha256: b05222b2b64e0acd7b823ca0b487c0412c4a1f6a9e14f33dbc6ea7997842a471
Contents?: true
Size: 518 Bytes
Versions: 2
Compression:
Stored size: 518 Bytes
Contents
class MigrateExistingDate < ActiveRecord::Migration def up %w(Image::Response Question::Answer Text::Response URL::Response).each do |class_name| "Tasks::Taskables::#{class_name}".constantize.send(:all) do |model| if model.request.task.present? Tasks::Taskables::Taskable::Response.create do |response| response.author = model.author response.submittable = model response.task = model.request.task end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tasuku-0.1.0 | db/migrate/20140606072225_migrate_existing_date.rb |
tasuku-0.0.1 | db/migrate/20140606072225_migrate_existing_date.rb |