Sha256: 62132799596e49e6f82afecdbee51edc73f27a49cd409e8217f92e486cebbd42

Contents?: true

Size: 251 Bytes

Versions: 6

Compression:

Stored size: 251 Bytes

Contents

class LegacyBase < ActiveRecord::Base
  self.abstract_class = true
  establish_connection "legacy"
  
  def migrate
    new_record = self.class.to_s.gsub(/Legacy/,'::').constantize.new(map)
    new_record[:id] = self.id
    new_record.save
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
trucker-0.5.1 generators/truck/templates/legacy_base.rb
trucker-0.5.0 generators/truck/templates/legacy_base.rb
trucker-0.4.1 generators/truck/templates/legacy_base.rb
trucker-0.3.0 generators/truck/templates/legacy_base.rb
trucker-0.2.0 generators/truck/templates/legacy_base.rb
trucker-0.1.0 generators/truck/templates/legacy_base.rb