lib/cachers/railtie.rb in cachers-0.1.1 vs lib/cachers/railtie.rb in cachers-4.0.0.0
- old
+ new
@@ -1,9 +1,15 @@
module Cachers
class Railtie < Rails::Railtie
- initializer :cachers do
- Dir[Rails.root.join('app/cachers/*')].each { |file| load file }
+ config.after_initialize do
+ Dir[Rails.root.join('app/cachers/*')].each do |file|
+ load file
+ end
+ end
+
+ rake_tasks do
+ load 'tasks/cachers.rake'
end
end
end