mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Install plugin view paths into AM view load path
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user