Parent

Class Index [+]

Quicksearch

ActionView::LogSubscriber

Action View Log Subscriber

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

Public Instance Methods

logger() click to toggle source

TODO: Ideally, ActionView should have its own logger so it does not depend on AC.logger

    # File lib/action_view/log_subscriber.rb, line 16
16:     def logger
17:       ActionController::Base.logger if defined?(ActionController::Base)
18:     end
render_collection(event) click to toggle source
Alias for: render_template
render_partial(event) click to toggle source
Alias for: render_template
render_template(event) click to toggle source
    # File lib/action_view/log_subscriber.rb, line 6
 6:     def render_template(event)
 7:       message = "Rendered #{from_rails_root(event.payload[:identifier])}"
 8:       message << " within #{from_rails_root(event.payload[:layout])}" if event.payload[:layout]
 9:       message << (" (%.1fms)" % event.duration)
10:       info(message)
11:     end
Also aliased as: render_partial, render_collection

Protected Instance Methods

from_rails_root(string) click to toggle source
    # File lib/action_view/log_subscriber.rb, line 22
22:     def from_rails_root(string)
23:       string.sub("#{Rails.root}/", "").sub(/^app\/views\//, "")
24:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.