class Planter::Config
Configure the application seeder.
@example
Planter.configure { |seeder| seeder.seeders = %i[users] }
Attributes
The adapter used to create records, discover parent records, and inspect database table names. Custom adapters should implement the table-oriented public API documented by Planter::Adapters::ActiveRecord.
@return [Object]
Tell the application where the CSV seed files are kept. Must be a path relative to Rails.root.
@param [String] directory
@return [String]
The default trim mode for ERB. Must be β%β, β<>β, β>β, or β-β. For more information, see documentation for ERB::new.
@param [String] erb_trim_mode
@return [String]
When true, donβt print output when seeding.
@param [Boolean] quiet
@return [Boolean]
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]
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
Source
# File lib/planter/config.rb, line 73 def initialize @quiet = false @seeders_directory = ::File.join("db", "seeds") @csv_files_directory = ::File.join("db", "seed_files") end
Create a new instance of the config.
Public Instance Methods
Source
# File lib/planter/config.rb, line 67 def adapter @adapter ||= default_adapter end
Return the configured adapter, or lazily load the default Active Record adapter.
@return [Object]