class Planter::Config

Configure the application seeder.

@example

Planter.configure { |seeder| seeder.seeders = %i[users] }

Attributes

csv_files_directory[RW]

Tell the application where the CSV seed files are kept. Must be a path relative to Rails.root.

@param [String] directory

@return [String]

erb_trim_mode[RW]

The default trim mode for ERB. Must be “%”, “<>”, “>”, or “-”. For more information, see documentation for ERB::new.

@param [String] erb_trim_mode

@return [String]

quiet[RW]

When true, don't print output when seeding.

@param [Boolean] quiet

@return [Boolean]

seeders[RW]

Tell the application what seeders exist. Elements should be in the correct order to seed the tables successfully, and can be strings or symbols.

@param [Array] seeders

@return [Array]

seeders_directory[RW]

Tell the application where the seeder classes are kept. Must be a path relative to Rails.root.

@param [String] directory

@return [String]

Public Class Methods

new() click to toggle source

Create a new instance of the config.

# File lib/planter/config.rb, line 56
def initialize
  @quiet = false
  @seeders_directory = ::File.join('db', 'seeds')
  @csv_files_directory = ::File.join('db', 'seed_files')
end