Sha256: 71309a7154e3331290b237cd86c9b875d8fa997cdad837c747ea71a5f94fb5cf
Contents?: true
Size: 478 Bytes
Versions: 17
Compression:
Stored size: 478 Bytes
Contents
require 'earth/locality/data_miner' LodgingClass.class_eval do data_miner do process "Ensure CountryLodgingClass is populated" do CountryLodgingClass.run_data_miner! end process "Derive lodging classes from CountryLodgingClass" do connection.select_values("SELECT DISTINCT lodging_class_name FROM #{CountryLodgingClass.quoted_table_name}").each do |lodging_class_name| find_or_create_by_name lodging_class_name end end end end
Version data entries
17 entries across 17 versions & 1 rubygems