Turn of Tabs in Textmate
God it took me a long time to find this again ...
If you want to you can disable tabs from the command line. Make sure TextMate isn't running, and then type:
defaults write com.macromates.textmate OakProjectWindowShowTabBarEnabled false
into the terminal. To bring tabs back, you'll have to:
defaults delete com.macromates.textmate OakProjectWindowShowTabBarEnabled
Winmerge for OSX
Slightly spurious title as there is absolutely no need for a winmerge for OSX. Included with the Developer Tools for OSX is filemerge, which is an excellent diff tool. There is also a tool to call it from a terminal called opendiff so you can do
opendiff dir1 dir2
opendiff file1 file2
You can also find filemerge using spotlight.
Gems from GitHub
Answer to my problems with gems being updated at github well before they are updated at rubyforge. Following allows you to install gems from github using standard gem command
sudo gem update system
gem sources -a http://gems.github.com
Unfortunately this doesn't seem to work for rspec. Perhaps they have not published their plugin as a gem there.
New Rails Project (part 3) - Default Layout
Here we discuss getting a simple structure in place for laying out the pages of our application ...
New Rails Project (part 2) - Plugins
Now we have a deployed application we can add some plugins to get those extra bits of functionality we want.
Creating a New Rails Project
A step by step guide to creating a new rails project. The project will be called np. We start with ...
Getting a Rails action to return to where it was called from
Often in Rails you will want to use a partial in more than one place. Such partials might add or delete things. Once this is done you will want to return to where you were. The following works without javascript and Ajax ...
Rails Debugging
Easy peasy once you know how.
- start up your server with the
-u - put
debuggerin your code where you want the debugger to start - run that code e.g. in a web browser
The web browser will hang, and a debugging session will be started in the terminal you ran the server. Main things to remember are
hget helpllist the code where you arereloadif debugger doesn't pick up changes in your code give it a little kickcontcarry on execution
That should be enough to keep me happy
Obtrusive Javascript and Rails
Rails has a number of helpers which put fairly chunky bits of javascript into your html. This isn't the purest solution, and is particularly messy for accessibility when javascript is disabled. A number of people have addressed this issue which I'll discuss here
Javascript for Rails
This article was prompted by the problems caused when using a restful design and deleting things with link_to