Class: ActionView::LogSubscriber::Start

Inherits:
Object
  • Object
show all
Includes:
Utils
Defined in:
actionview/lib/action_view/log_subscriber.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods included from Utils

#logger

Instance Method Details

#finish(name, id, payload) ⇒ Object


93
94
# File 'actionview/lib/action_view/log_subscriber.rb', line 93

def finish(name, id, payload)
end

#start(name, id, payload) ⇒ Object


75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'actionview/lib/action_view/log_subscriber.rb', line 75

def start(name, id, payload)
  return unless logger
  logger.debug do
    qualifier =
      if name == "render_template.action_view"
        ""
      elsif name == "render_layout.action_view"
        "layout "
      end

    return unless qualifier

    message = +"  Rendering #{qualifier}#{from_rails_root(payload[:identifier])}"
    message << " within #{from_rails_root(payload[:layout])}" if payload[:layout]
    message
  end
end