Skip to content

Instantly share code, notes, and snippets.

@aviat aviat/byebug-active-record.rb Secret
Last active Jan 18, 2017

What would you like to do?
(byebug) b ActiveRecord::ConnectionAdapters::AbstractAdapter.log
Successfully created breakpoint with id 2
(byebug) c
irb(main):025:0> Post.first
Stopped by breakpoint 2 at /Users/jb/Documents/mc/code/AgentRubyTests/weblog-rails4/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:466
(byebug) self.adapter_name
(byebug) sql
"SELECT \"posts\".* FROM \"posts\" ORDER BY \"posts\".\"id\" ASC LIMIT 1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.