in reply to Can't locate object method
Also, two lines above this, you appear to have a syntax error.