aboutsummaryrefslogtreecommitdiffstats
path: root/lib/patch_mailer_paths.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-04-30 12:14:26 +0100
committerLouise Crow <louise.crow@gmail.com>2013-04-30 12:14:26 +0100
commit945fb4b52727115575bbb3941b1151cd21a6a60e (patch)
tree11c2b5304f8e10689caf6d27d14197cab1491c2a /lib/patch_mailer_paths.rb
parente90c170f84ab4b91b25c673045bc0bbec0c5788a (diff)
parentec01e0946dfab8db11e63ad565d18958a8fec1a6 (diff)
Merge remote-tracking branch 'mysociety_github/rails-3' into rails-3use-with-alaveteli-0.11rails-3
Diffstat (limited to 'lib/patch_mailer_paths.rb')
-rw-r--r--lib/patch_mailer_paths.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/patch_mailer_paths.rb b/lib/patch_mailer_paths.rb
index d0a0b23..7a524fa 100644
--- a/lib/patch_mailer_paths.rb
+++ b/lib/patch_mailer_paths.rb
@@ -2,10 +2,9 @@
# and at startup in production - to patch existing app classes.
# See http://stackoverflow.com/questions/7072758/plugin-not-reloading-in-development-mode
#
-require 'dispatcher'
-Dispatcher.to_prepare do
+Rails.configuration.to_prepare do
# Override mailer templates with theme ones. Note doing this in a before_filter,
# as we do with the controller paths, doesn't seem to have any effect when
# running in production
- ActionMailer::Base.view_paths.unshift File.join(File.dirname(__FILE__), "views")
+ ActionMailer::Base.prepend_view_path File.join(File.dirname(__FILE__), "views")
end