Permalink
Browse files

Add railtie

  • Loading branch information...
1 parent fb6837a commit f6cfd1c08b60dc7b1b7b2f153c2037d006c1bdfe @sentientmonkey committed Nov 8, 2011
Showing with 13 additions and 2 deletions.
  1. +1 −2 init.rb
  2. +12 −0 lib/simple_config/railtie.rb
View
@@ -1,4 +1,3 @@
$LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
-require 'simple_config'
-require 'simple_config/controller_mixin'
+require 'simple_config/railtie' if defined?(Rails)
@@ -0,0 +1,12 @@
+require 'simple_config'
+require 'simple_config/controller_mixin'
+require 'rails'
+
+module SimpleConfig
+ class Railtie < Rails::Railtie
+ railtie_name :simple_config
+ rake_tasks do
+ load "tasks/simple_config.rake"
+ end
+ end
+end

0 comments on commit f6cfd1c

Please sign in to comment.