Module: ActionView::Helpers::ControllerHelper

Included in:
ActionView::Helpers
Defined in:
actionview/lib/action_view/helpers/controller_helper.rb

Overview

This module keeps all methods and behavior in ActionView that simply delegates to the controller.

Instance Method Summary collapse

Instance Method Details

#assign_controller(controller) ⇒ Object


13
14
15
16
17
18
19
# File 'actionview/lib/action_view/helpers/controller_helper.rb', line 13

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)
    @_default_form_builder = controller.default_form_builder if controller.respond_to?(:default_form_builder)
  end
end

#loggerObject


21
22
23
# File 'actionview/lib/action_view/helpers/controller_helper.rb', line 21

def logger
  controller.logger if controller.respond_to?(:logger)
end