Module: SeedFu

Defined in:
lib/seed-fu.rb,
lib/seed-fu/runner.rb,
lib/seed-fu/seeder.rb,
lib/seed-fu/writer.rb,
lib/seed-fu/railtie.rb,
lib/seed-fu/version.rb,
lib/seed-fu/block_hash.rb,
lib/seed-fu/active_record_extension.rb

Defined Under Namespace

Modules: ActiveRecordExtension Classes: BlockHash, Railtie, Runner, Seeder, Writer

Constant Summary collapse

VERSION =

The current version of Seed Fu

'2.3.9'
@@quiet =

Set ‘SeedFu.quiet = true` to silence all output

false
@@fixture_paths =

Set this to be an array of paths to directories containing your seed files. If used as a Rails plugin, SeedFu will set to to contain ‘Rails.root/db/fixtures` and `Rails.root/db/fixtures/Rails.env`

['db/fixtures']

Class Method Summary collapse

Class Method Details

.seed(fixture_paths = SeedFu.fixture_paths, filter = nil) ⇒ Object

Load seed data from files

Parameters:

  • fixture_paths (Array) (defaults to: SeedFu.fixture_paths)

    The paths to look for seed files in

  • filter (Regexp) (defaults to: nil)

    If given, only filenames matching this expression will be loaded



28
29
30
# File 'lib/seed-fu.rb', line 28

def self.seed(fixture_paths = SeedFu.fixture_paths, filter = nil)
  Runner.new(fixture_paths, filter).run
end