lib/timber/events/controller_call.rb in timber-2.0.24 vs lib/timber/events/controller_call.rb in timber-2.1.0.rc1
- old
+ new
@@ -1,5 +1,8 @@
+require "timber/event"
+require "timber/util"
+
module Timber
module Events
# The controller call event tracks controller invocations. For example, this line in Rails:
#
# Processing by PagesController#home as HTML
@@ -21,9 +24,10 @@
def to_hash
{controller: controller, action: action, params_json: params_json}
end
alias to_h to_hash
+ # Builds a hash representation of containing simply objects, suitable for serialization.
def as_json(_options = {})
{:controller_call => to_hash}
end
def message
\ No newline at end of file