Closed blocknotes closed 3 years ago
Some extra details: this is probably an uncommon scenario because we have a Rails 5.2 application which is not in the root of the project and it looks like that we have a conflict with the AR _ignorecallback method. Reference here.
In the end, I decided to override that method in a non-versioned custom initializer for development:
Rails.application.config.after_initialize do |app|
puts '- ActiveRecord::LogSubscriber - ignored_callstack (private) - for Rails 5.2.x + Makara'
ActiveRecord::LogSubscriber.log_subscribers.each do |log_subscriber|
log_subscriber.class_eval do
def ignored_callstack(path)
super || path.start_with?(RbConfig::CONFIG["libdir"])
end
end
end
end
Nice gem!
I have just noticed the following behaviour: I'm in development locally in a project and I haven't the makara subconfig in database.yml - the queries are proxied anyway by makara. This could be fine but it's hiding the real code line that produced a specific query (related to
config.active_record.verbose_query_logs = true
).Ex.
Is is possible to override this behaviour in some way? Otherwise, is it possible to turn off makara with some config option?