Class: ActionView::LogSubscriber
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
ActiveSupport::LogSubscriber
|
Defined in: | actionview/lib/action_view/log_subscriber.rb |
Overview
Provides functionality so that ::Rails can output logs from Action View.
Constant Summary
-
EMPTY =
# File 'actionview/lib/action_view/log_subscriber.rb', line 31''
-
VIEWS_PATTERN =
# File 'actionview/lib/action_view/log_subscriber.rb', line 8/^app\/views\//
::ActiveSupport::LogSubscriber - Inherited
BLACK, BLUE, BOLD, CLEAR, CYAN, GREEN, MAGENTA, RED, WHITE, YELLOW
Class Attribute Summary
::ActiveSupport::LogSubscriber - Inherited
Class Method Summary
- .new ⇒ LogSubscriber constructor
::ActiveSupport::LogSubscriber - Inherited
.flush_all! | Flush all log_subscribers' logger. |
.log_subscribers |
::ActiveSupport::Subscriber - Inherited
.attach_to | Attach the subscriber to a namespace. |
.method_added | Adds event subscribers for all new methods added to the class. |
.new, .subscribers |
Instance Attribute Summary
::ActiveSupport::LogSubscriber - Inherited
Instance Method Summary
- #logger
-
#render_collection(event)
Alias for #render_template.
-
#render_partial(event)
Alias for #render_template.
- #render_template(event) (also: #render_partial, #render_collection)
::ActiveSupport::LogSubscriber - Inherited
::ActiveSupport::Subscriber - Inherited
Constructor Details
.new ⇒ LogSubscriber
# File 'actionview/lib/action_view/log_subscriber.rb', line 10
def initialize @root = nil super end
Instance Method Details
#logger
[ GitHub ]# File 'actionview/lib/action_view/log_subscriber.rb', line 25
def logger ActionView::Base.logger end
#render_collection(event)
Alias for #render_template.
# File 'actionview/lib/action_view/log_subscriber.rb', line 23
alias :render_collection :render_template
#render_partial(event)
Alias for #render_template.
# File 'actionview/lib/action_view/log_subscriber.rb', line 22
alias :render_partial :render_template
#render_template(event) Also known as: #render_partial, #render_collection
[ GitHub ]# File 'actionview/lib/action_view/log_subscriber.rb', line 15
def render_template(event) info do = " Rendered #{from_rails_root(event.payload[:identifier])}" << " within #{from_rails_root(event.payload[:layout])}" if event.payload[:layout] << " (#{event.duration.round(1)}ms)" end end