Action View Log Subscriber

Provides functionality so that Rails can output logs from Action View.

Methods
F
L
R
Constants
VIEWS_PATTERN = /^app\/views\//.freeze
 
Instance Public methods
logger()
# File actionpack/lib/action_view/log_subscriber.rb, line 18
def logger
  ActionView::Base.logger
end
render_collection(event)
Alias for: render_template
render_partial(event)
Alias for: render_template
render_template(event)
Also aliased as: render_partial, render_collection
# File actionpack/lib/action_view/log_subscriber.rb, line 8
def render_template(event)
  return unless logger.info?
  message = "  Rendered #{from_rails_root(event.payload[:identifier])}"
  message << " within #{from_rails_root(event.payload[:layout])}" if event.payload[:layout]
  message << " (#{event.duration.round(1)}ms)"
  info(message)
end
Instance Protected methods
from_rails_root(string)
# File actionpack/lib/action_view/log_subscriber.rb, line 24
def from_rails_root(string)
  string.sub("#{Rails.root}/", "").sub(VIEWS_PATTERN, "")
end