diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-01-19 21:05:37 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-01-19 21:05:37 +1100 |
commit | 2107921000f4a186fed36e676d1ac089c8be1f99 (patch) | |
tree | 42f2188f058f8401d57f0d4c72063689a93e0419 /railties/lib/rails/plugin.rb | |
parent | ccb7d9def3c20037c9ed5989d8cae1ed68763f4f (diff) | |
parent | ed8501ef16fb2f5e4bd4d987740f5e5f62978400 (diff) | |
download | rails-2107921000f4a186fed36e676d1ac089c8be1f99.tar.gz rails-2107921000f4a186fed36e676d1ac089c8be1f99.tar.bz2 rails-2107921000f4a186fed36e676d1ac089c8be1f99.zip |
Merge branch 'master' of git://github.com/rails/rails into rails
Diffstat (limited to 'railties/lib/rails/plugin.rb')
-rw-r--r-- | railties/lib/rails/plugin.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb index a057b8f701..0c09730963 100644 --- a/railties/lib/rails/plugin.rb +++ b/railties/lib/rails/plugin.rb @@ -50,7 +50,11 @@ module Rails end initializer :add_view_paths, :after => :initialize_framework_views do - ActionController::Base.view_paths.concat ["#{path}/app/views"] if File.directory?("#{path}/app/views") + plugin_views = "#{path}/app/views" + if File.directory?(plugin_views) + ActionController::Base.view_paths.concat([plugin_views]) if defined? ActionController + ActionMailer::Base.view_paths.concat([plugin_views]) if defined? ActionMailer + end end # TODO Isn't it supposed to be :after => "action_controller.initialize_routing" ? @@ -62,4 +66,4 @@ module Rails end end end -end
\ No newline at end of file +end |