Class: SimpleSeed::SeedLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_seed/seed_loader.rb

Class Method Summary collapse

Class Method Details

.import_fixture(name) ⇒ Object



7
8
9
10
11
# File 'lib/simple_seed/seed_loader.rb', line 7

def self.import_fixture(name)
  puts "Import #{name}..."
  ActiveRecord::FixtureSet.create_fixtures \
    Rails.root.join('db', 'fixtures'), name
end

.load_seedObject



3
4
5
# File 'lib/simple_seed/seed_loader.rb', line 3

def self.load_seed
  module_eval open(Rails.root.join('db', 'seeds.rb')).read
end