correcting rails syntax