lib/bullet.rb in bullet-6.1.3 vs lib/bullet.rb in bullet-6.1.4
- old
+ new
@@ -37,11 +37,11 @@
:counter_cache_enable,
:stacktrace_includes,
:stacktrace_excludes,
:skip_html_injection
attr_reader :whitelist
- attr_accessor :add_footer, :orm_patches_applied
+ attr_accessor :add_footer, :orm_patches_applied, :skip_http_headers
available_notifiers = UniformNotifier::AVAILABLE_NOTIFIERS.select { |notifier| notifier != :raise }.map { |notifier| "#{notifier}=" }
available_notifiers_options = { to: UniformNotifier }
delegate(*available_notifiers, **available_notifiers_options)
@@ -71,10 +71,10 @@
def enable?
!!@enable
end
def app_root
- (defined?(::Rails.root) ? Rails.root.to_s : Dir.pwd).to_s
+ @app_root ||= (defined?(::Rails.root) ? Rails.root.to_s : Dir.pwd).to_s
end
def n_plus_one_query_enable?
enable? && !!@n_plus_one_query_enable
end