Sha256: 679c459869f72b1ede368ae7094b508b328be8ad37b8675adeaee69148d3c5f6
Contents?: true
Size: 577 Bytes
Versions: 2
Compression:
Stored size: 577 Bytes
Contents
module Bugsnag module Helpers def self.cleanup_hash(hash) hash.inject({}) do |h, (k, v)| h[k.gsub(/\./, "-")] = v.to_s h end end def self.apply_filters(hash, filters) if filters hash.each do |k, v| if filters.any? {|f| k.to_s.include?(f.to_s) } hash[k] = "[FILTERED]" elsif v.respond_to?(:to_hash) apply_filters(hash[k]) end end end end def self.param_context(params) "#{params[:controller]}##{params[:action]}" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bugsnag-1.0.2 | lib/bugsnag/helpers.rb |
bugsnag-1.0.1 | lib/bugsnag/helpers.rb |