lib/bullet.rb in bullet-7.0.7 vs lib/bullet.rb in bullet-7.1.0
- old
+ new
@@ -38,11 +38,11 @@
:counter_cache_enable,
:stacktrace_includes,
:stacktrace_excludes,
:skip_html_injection
attr_reader :safelist
- attr_accessor :add_footer, :orm_patches_applied, :skip_http_headers
+ attr_accessor :add_footer, :orm_patches_applied, :skip_http_headers, :always_append_html_body
available_notifiers =
UniformNotifier::AVAILABLE_NOTIFIERS.select { |notifier| notifier != :raise }.map { |notifier| "#{notifier}=" }
available_notifiers_options = { to: UniformNotifier }
delegate(*available_notifiers, **available_notifiers_options)
@@ -68,12 +68,16 @@
Bullet::ActiveRecord.enable if active_record?
end
end
end
+ alias enabled= enable=
+
def enable?
!!@enable
end
+
+ alias enabled? enable?
# Rails.root might be nil if `railties` is a dependency on a project that does not use Rails
def app_root
@app_root ||= (defined?(::Rails.root) && !::Rails.root.nil? ? Rails.root.to_s : Dir.pwd).to_s
end