Thursday, September 10, 2009

Beware of Courier font in Firefox

I noticed today that in Firefox (3.5.2), the Courier font does not size well at all. The smallest it gets is about 12px.

If you want a nice fixed-width font that does work well in Firefox, use Courier New instead.

Tuesday, September 8, 2009

NoMethodError, undefined method `call' for MyController:Class

If you're getting this error:
NoMethodError in MyController#my_action
undefined method `call' for ClientScriptsController:Class

...then you might have forgotten to make your controller inherit (extend) the ApplicationController class, like I did. The big clue is that the undefined method is in the class, not the instance.

Controllers should be set up like this:

class MyController < ApplicationController
def my_action
#do something...
end
end