lib/devmail/engine.rb in devmail-0.0.1 vs lib/devmail/engine.rb in devmail-0.1.0
- old
+ new
@@ -1,11 +1,9 @@
-require "devmail"
-require "rails"
-require "mongoid"
-
module Devmail
- require 'devmail/development_mail_interceptor.rb'
+ class Engine < ::Rails::Engine
+ isolate_namespace Devmail
- class Engine < Rails::Engine
-
+ initializer "devmail_interceptor" do
+ ActionMailer::Base.register_interceptor(Devmail::Interceptor) if Rails.env.development?
+ end
end
end