Skip to content

Instantly share code, notes, and snippets.

@aviat
Last active January 18, 2017 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aviat/b8e3a51593aed2ee01ca547492e080f9 to your computer and use it in GitHub Desktop.
Save aviat/b8e3a51593aed2ee01ca547492e080f9 to your computer and use it in GitHub Desktop.
(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
"SQLite"
(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