Skip to content

Instantly share code, notes, and snippets.

View assembler's full-sized avatar

Milovan Zogovic assembler

  • metoda GmbH
  • Munich, Germany
  • 06:10 (UTC +02:00)
View GitHub Profile
@assembler
assembler / descriptive_sql_load_log.rb
Created December 7, 2011 10:26 — forked from jlindley/descriptive_sql_load_log.rb
Let Rails display file names and line numbers for log activity.
module ActiveRecord
module ConnectionAdapters
class AbstractAdapter
protected
# Rails 3.1
def log_with_trace(sql, name = "SQL", binds = [], &block)
if @logger && @logger.debug?
c = caller.detect{|line| line !~ /(activerecord|active_support|__DELEGATION__|\/lib\/|\/vendor\/plugins|\/vendor\/gems)/i}
c ||= caller.first
@assembler
assembler / README.md
Last active December 20, 2015 11:09 — forked from ankane/README.md

Rails 4 fork

Benchmark Bundler

Because loading gems can take longer than you think

$ curl -fsSL https://gist.github.com/raw/6121664/benchmark.rb | ruby
............................................................[DONE]