Sha256: b43bb6cd783fe4adae30dfc6e1dd5c26360e031d9ef91c7251bc634aa019e284

Contents?: true

Size: 467 Bytes

Versions: 15

Compression:

Stored size: 467 Bytes

Contents

require 'yaml'

class AddIsoCodes
  
  def self.up
    #find the erp_base_erp_svcs engine
	  engine_path = Rails::Application::Railties.engines.find{|item| item.engine_name == 'erp_base_erp_svcs'}.config.root.to_s
	
	  GeoCountry.load_from_file(File.join(engine_path,'db/data_sets/geo_countries.yml'))
    GeoZone.load_from_file(File.join(engine_path,'db/data_sets/geo_zones.yml'))
  end
  
  def self.down
    GeoCountry.delete_all
    GeoZone.delete_all
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
erp_base_erp_svcs-4.0.0 db/data_migrations/20110609150135_add_iso_codes.rb
erp_base_erp_svcs-3.1.5 db/data_migrations/20110609150135_add_iso_codes.rb
erp_base_erp_svcs-3.1.4 db/data_migrations/20110609150135_add_iso_codes.rb
erp_base_erp_svcs-3.1.3 db/data_migrations/20110609150135_add_iso_codes.rb
erp_base_erp_svcs-3.1.2 db/data_migrations/20110609150135_add_iso_codes.rb
erp_base_erp_svcs-3.1.1 db/data_migrations/20110609150135_add_iso_codes.rb
erp_base_erp_svcs-3.0.7 db/data_migrations/20110609150135_add_iso_codes.rb
erp_base_erp_svcs-3.1.0 db/data_migrations/20110609150135_add_iso_codes.rb
erp_base_erp_svcs-3.0.6 db/data_migrations/20110609150135_add_iso_codes.rb
erp_base_erp_svcs-3.0.5 db/data_migrations/20110609150135_add_iso_codes.rb
erp_base_erp_svcs-3.0.4 db/data_migrations/20110609150135_add_iso_codes.rb
erp_base_erp_svcs-3.0.3 db/data_migrations/20110609150135_add_iso_codes.rb
erp_base_erp_svcs-3.0.2 db/data_migrations/20110609150135_add_iso_codes.rb
erp_base_erp_svcs-3.0.1 db/data_migrations/20110609150135_add_iso_codes.rb
erp_base_erp_svcs-3.0.0 db/data_migrations/20110609150135_add_iso_codes.rb