Sha256: ebfc6c0b1c07be447d9869f1fd1a0971f38b134fd22c6378409deca28db8437e
Contents?: true
Size: 387 Bytes
Versions: 17
Compression:
Stored size: 387 Bytes
Contents
require 'tasks/database' module MigrationHelpers def create table_name, params, id_column_name = :id database[table_name].insert(params); database[table_name].order(id_column_name).last end def clean table_name database[table_name].delete rescue puts "Error cleaning #{table_name} #{$!}" end def database @database ||= DB.connection_for_env 'test' end end
Version data entries
17 entries across 17 versions & 1 rubygems