briandoll / dotfiles

dotfiles for: ack, git, bash, emacs, ruby, rails, vim

This URL has Read+Write access

dotfiles / railsrc
100644 16 lines (11 sloc) 0.22 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/ruby
 
def change_log(stream)
  ActiveRecord::Base.logger = Logger.new(stream)
  ActiveRecord::Base.clear_active_connections!
end
 
def show_log
  change_log(STDOUT)
end
 
def hide_log
  change_log(nil)
end