A newbie question

I'm new with Rails and I'm creating a simple app.

I have these 3 files and would like to display an error message when
the form fails, saying the problem. Something like 'Title must be
filled.' .

I don't know how to do that.

Please help me.

Thank you very much,


And one more thing. Your intended action is not index but new. Change
action name to new and view file to new.html.erb


If I didn't understand wrong.
You need to add some validation into your "sfile" model
like validates_presence_of :title, :on => :create, :message => "Title
must be filled"

Thank you very much for the messages.