lib/bullet.rb in bullet-4.8.0 vs lib/bullet.rb in bullet-4.9.0
- old
+ new
@@ -23,15 +23,15 @@
end
end
end
class << self
- attr_writer :enable, :n_plus_one_query_enable, :unused_eager_loading_enable, :counter_cache_enable
+ attr_writer :enable, :n_plus_one_query_enable, :unused_eager_loading_enable, :counter_cache_enable, :stacktrace_includes
attr_reader :notification_collector, :whitelist
attr_accessor :add_footer
- delegate :alert=, :console=, :growl=, :rails_logger=, :xmpp=, :airbrake=, :to => UniformNotifier
+ delegate :alert=, :console=, :growl=, :rails_logger=, :xmpp=, :airbrake=, :bugsnag=, :to => UniformNotifier
def raise=(should_raise)
UniformNotifier.raise=(should_raise ? Notification::UnoptimizedQueryError : false)
end
@@ -62,12 +62,16 @@
def counter_cache_enable?
self.enable? && !!@counter_cache_enable
end
+ def stacktrace_includes
+ @stacktrace_includes || []
+ end
+
def add_whitelist(options)
@whitelist[options[:type]][options[:class_name].classify] ||= []
- @whitelist[options[:type]][options[:class_name].classify] << options[:association]
+ @whitelist[options[:type]][options[:class_name].classify] << options[:association].to_sym
end
def get_whitelist_associations(type, class_name)
Array(@whitelist[type][class_name])
end