require 'active_record/fixtures' require 'fileutils' module SmartDump class YamlLoader def initialize(path) @path = path end def load_fixtures! Dir.glob(File.join(@path,'*.yml')).each do |file| base_name = File.basename(file, '.*') ActiveRecord::FixtureSet.create_fixtures(@path, base_name) end end end end