mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
21 lines
No EOL
767 B
Ruby
21 lines
No EOL
767 B
Ruby
module ActionView
|
|
module Helpers
|
|
# This module keeps all methods and behavior in ActionView
|
|
# that simply delegates to the controller.
|
|
module ControllerHelper #:nodoc:
|
|
attr_internal :controller, :request
|
|
|
|
delegate :request_forgery_protection_token, :params, :session, :cookies, :response, :headers,
|
|
:flash, :action_name, :controller_name, :controller_path, :to => :controller
|
|
|
|
delegate :logger, :to => :controller, :allow_nil => true
|
|
|
|
def assign_controller(controller)
|
|
if @_controller = controller
|
|
@_request = controller.request if controller.respond_to?(:request)
|
|
@_config = controller.config.inheritable_copy if controller.respond_to?(:config)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end |