Sha256: e9ca8e43609139daf0851df04e1d15f807f401113ab16ab913d984fa12a5350a
Contents?: true
Size: 629 Bytes
Versions: 2
Compression:
Stored size: 629 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]}" if params && params[:controller] && params[:action] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bugsnag-1.0.4 | lib/bugsnag/helpers.rb |
bugsnag-1.0.3 | lib/bugsnag/helpers.rb |