Permalink
Browse files

irb config

  • Loading branch information...
1 parent efaa415 commit 40bd8e1a9eacaf6788bd9476bc938231207496b8 @bloy committed Sep 19, 2012
Showing with 26 additions and 7 deletions.
  1. +14 −0 .irb-railsrc
  2. +3 −0 .irbrc
  3. +9 −7 make_links_files
View
@@ -0,0 +1,14 @@
+# vim: ft=ruby:
+def toggle_sql
+ if ActiveRecord::Base.logger
+ set_logger nil and return false
+ else
+ set_logger Logger.new(STDOUT) and return true
+ end
+end
+
+def set_logger(logger)
+ ActiveRecord::Base.logger = logger
+ ActiveRecord::Base.clear_active_connections!
+end
+set_logger nil # start with the normal logger
View
@@ -0,0 +1,3 @@
+if defined?(Rails) && Rails.env
+ load File.join(File.dirname(__FILE__), '.irb-railsrc')
+end
View
@@ -1,28 +1,30 @@
.astylerc
+.bash_completion
.bash_logout
.bash_profile
-.bash_completion
.bashrc
bin/tmux-attach
bin/tmux-clean-sessions
-bin/tmux-default
bin/tmux-connect
-.cvsrc
+bin/tmux-default
+.cvsrc
.dircolors
-etc/aimicon.gif
etc/aimicon2.png
+etc/aimicon.gif
etc/LaTeX.Makefile
.gitconfig
.gnupg/gpg.conf
.gvimrc
.inputrc
+.irb-railsrc
+.irbrc
.perltidyrc
.screenrc
-.ssh/config
+.ssh/config
.subversion/config
.subversion/servers
.tigrc
.tmux.conf
-.vimrc
-.Xresources
+.vimrc
+.Xresources
.zshrc

0 comments on commit 40bd8e1

Please sign in to comment.