Class: RailsJsonSeeder::Seeder
- Inherits:
-
Object
- Object
- RailsJsonSeeder::Seeder
- Defined in:
- lib/rails_json_seeder/seeder.rb
Overview
Provides functionality to load seed data from JSON files for Rails applications. This module encapsulates the logic to read configurations, parse JSON files, and seed the database with the provided data.
Example:
Seeder.load_seeds('path_to/seed_config.yml')
Instance Method Summary collapse
Instance Method Details
#load_seeds(config_path = 'db/seed_config.yml') ⇒ Object
18 19 20 21 |
# File 'lib/rails_json_seeder/seeder.rb', line 18 def load_seeds(config_path = 'db/seed_config.yml') config = load_config(config_path) process_seeds(config) end |