Class: PartyFoul::IssueRenderers::Rails
- Defined in:
- lib/party_foul/issue_renderers/rails.rb
Instance Attribute Summary
Attributes inherited from Base
#body, #env, #exception, #sha
Instance Method Summary collapse
-
#occurred_at ⇒ String
The timestamp when the exception occurred.
-
#params ⇒ Hash
Rails params hash.
-
#session ⇒ Hash
Rails session hash.
Methods inherited from Rack
#comment_options, #http_headers, #ip_address_locator, #request, #url
Methods inherited from Base
#body_options, #build_table_from_hash, #comment, #comment_options, #fingerprint, #initialize, #labels, #rows_for_table_from_hash, #stack_trace, #title, #update_body
Constructor Details
This class inherits a constructor from PartyFoul::IssueRenderers::Base
Instance Method Details
#occurred_at ⇒ String
The timestamp when the exception occurred. Will use Time.current when available to record the time with the proper timezone
22 23 24 |
# File 'lib/party_foul/issue_renderers/rails.rb', line 22 def occurred_at @occurred_at ||= Time.current.strftime('%B %d, %Y %H:%M:%S %z') end |
#params ⇒ Hash
Rails params hash. Filtered parms are respected.
5 6 7 8 |
# File 'lib/party_foul/issue_renderers/rails.rb', line 5 def params parameter_filter = ActionDispatch::Http::ParameterFilter.new(env["action_dispatch.parameter_filter"]) parameter_filter.filter(env['action_dispatch.request.parameters']) end |
#session ⇒ Hash
Rails session hash. Filtered parms are respected.
13 14 15 16 |
# File 'lib/party_foul/issue_renderers/rails.rb', line 13 def session parameter_filter = ActionDispatch::Http::ParameterFilter.new(env['action_dispatch.parameter_filter']) parameter_filter.filter(env['rack.session'] || { } ) end |