Skip to content
Browse files

Rework loading of constants.

  • Loading branch information...
1 parent 68fb697 commit a0283a431ce446ab87e1b32844ec9805914f46f2 @midas committed
Showing with 7 additions and 9 deletions.
  1. +7 −9 lib/genesis.rb
View
16 lib/genesis.rb
@@ -1,13 +1,11 @@
-#$:.unshift(File.dirname(__FILE__)) unless
- #$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
-
-require 'genesis/active_record_extensions'
-require 'genesis/railtie'
-require 'genesis/schema_seed'
-require 'genesis/seeder'
+require 'genesis/railtie' if defined?( Rails )
module Genesis
+
SEEDS_ROOT = 'db/seeds'
-end
-#ActiveRecord::Base.send :include, Genesis::ActiveRecordExtensions if defined? ActiveRecord::Base
+ autoload :ActiveRecordExtensions, 'genesis/active_record_extensions'
+ autoload :SchemaSeed, 'genesis/schema_seed'
+ autoload :Seeder, 'genesis/seeder'
+
+end

0 comments on commit a0283a4

Please sign in to comment.
Something went wrong with that request. Please try again.