Sha256: d5f3852b9ce08f004ac23e1571d32b3192806f83c34a2bc8ab603db4e40fea1c

Contents?: true

Size: 363 Bytes

Versions: 1

Compression:

Stored size: 363 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
smart_dump-0.1.0 lib/smart_dump/yaml_loader.rb