form validation

I am using rails 3.0.7.i validate a field in form by inserting following line in model

class Post < ActiveRecord::Base

validates_presence_of :title

end

But i didn’t work.Is there any syntax change in rails 3.0.7?

Thanks

amritpalpathak.blogspot.com

"It doesn't work"? HOW MANY TIMES? How often are people going to have
to ask you to ASK INTELLIGENT QUESTIONS?!

Please read this:
   http://www.catb.org/~esr/faqs/smart-questions.html

..as it explains how to ask a question, and highlights the likely
outcomes of asking poorly framed questions (although, given the
responses you get... or rather, that you don't get - since very few
people answer you more than once... you might have thought you would
have started to gather these for yourself)

:-/

As the question is improper, I feel like providing an improper answer.

“…it works for me.”