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,
Gabriel.
11175
(-- --)
July 31, 2009, 4:17am
2
And one more thing. Your intended action is not index but new. Change
action name to new and view file to new.html.erb
Sijo
ChenJie
(ChenJie|抽屉)
July 31, 2009, 5:55am
3
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.