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

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

“…it works for me.”

On 10 July 2011 08:20, Amrit Pal P. [email protected]
wrote:

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?

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

Please read this:
How To Ask Questions The Smart Way

…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)

:-/