diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-07-31 17:51:43 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-07-31 17:51:43 -0700 |
commit | 909a7f430ba37cd7a54ae11a7af529bd949fa31c (patch) | |
tree | c6fd728961c15c6fe66b1e52b878762ca70b81e3 /actionpack/lib/action_view | |
parent | ad4553587efb8e758349b3f163e365781e4c6ad1 (diff) | |
download | rails-909a7f430ba37cd7a54ae11a7af529bd949fa31c.tar.gz rails-909a7f430ba37cd7a54ae11a7af529bd949fa31c.tar.bz2 rails-909a7f430ba37cd7a54ae11a7af529bd949fa31c.zip |
Ensure mailer view path is loaded when it's assigned. Path#[] raises if it isn't loaded.
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/paths.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/paths.rb b/actionpack/lib/action_view/paths.rb index a37706faee..d97f963540 100644 --- a/actionpack/lib/action_view/paths.rb +++ b/actionpack/lib/action_view/paths.rb @@ -42,6 +42,7 @@ module ActionView #:nodoc: end def [](path) + raise "Unloaded view path! #{@path}" unless @loaded @paths[path] end @@ -51,6 +52,7 @@ module ActionView #:nodoc: def load reload! unless loaded? + self end # Rebuild load path directory cache |