bellycard/napa

View on GitHub
lib/napa/active_record_extensions/seeder.rb

Summary

Maintainability
A
0 mins
Test Coverage
if defined?(ActiveRecord)
  module Napa
    class ActiveRecordSeeder
      def initialize(seed_file)
        @seed_file = seed_file
      end

      def load_seed
        fail "Seed file '#{@seed_file}' does not exist" unless File.file?(@seed_file)
        load @seed_file
      end
    end
  end
end