mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Cache controller_path on the AV instance to avoid needing to make additional calls back into the controller for each attempt (this was done because these calls were adding up significantly in partial rendering and showing up on profiles)
This commit is contained in:
@@ -195,7 +195,9 @@ module ActionView #:nodoc:
|
||||
|
||||
attr_internal :request, :layout
|
||||
|
||||
delegate :controller_path, :to => :controller, :allow_nil => true
|
||||
def controller_path
|
||||
@controller_path ||= controller && controller.controller_path
|
||||
end
|
||||
|
||||
delegate :request_forgery_protection_token, :template, :params, :session, :cookies, :response, :headers,
|
||||
:flash, :action_name, :controller_name, :to => :controller
|
||||
|
||||
Reference in New Issue
Block a user