mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Install plugin view paths into AM view load path
This commit is contained in:
parent
59cd044310
commit
f2693cda44
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue