Wednesday, January 19, 2011

Drink# 112: Your Ruby on Rails Juice

  1. AutoRefresh your browser whenever you hit save.: Refresh 'em as you change the code!
  2. Require Using Expanded Path: use of require with and without File.expand_path is different as the former will only require once while the latter might require multiple times!

2 comments:

  1. Actually, the other way around for expand_path: When you use an absolute path, Ruby will know that file has been loaded all the time, while relative paths might end up being loaded several times.

    ReplyDelete
  2. @Christoph, yes, you are right.

    ReplyDelete