Class: Stenotype::ContextHandlers::Rails::Controller
- Defined in:
- lib/stenotype/context_handlers/rails/controller.rb
Overview
ActionController handler to support fetching data out of a rails controller instance
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#as_json(*_args) ⇒ Hash
A JSON representation of controller's data.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Stenotype::ContextHandlers::Base
Instance Method Details
#as_json(*_args) ⇒ Hash
Returns a JSON representation of controller's data.
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/stenotype/context_handlers/rails/controller.rb', line 15 def as_json(*_args) { class: controller_class.name, method: method, url: url, referer: referer, params: params.except("controller", "action"), ip: remote_ip, } end |