Forum: Ruby on Rails How to retain values

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Anil R. (Guest)
on 2009-01-23 16:31
Hi all,
am new to Ruby world.

My problem is,
 I have 4 text fields,i wrote the validations for that like if blank?
I filled 3 fields then clicked the submit button, it displayed fine the
error that "please enter the required field" but the entered 3 values
are not displayed.
 Can any one please assist me ASAP.

Rob Z. (Guest)
on 2009-01-23 16:36
(Received via mailing list)
Hi Anil,

Can you post some code snippets of your controller (new and create
action)?  seems like the form is not being setup correctly (probably
in the create action of the controller)

Ar C. (Guest)
on 2009-01-23 19:59
A fairly common thing I've seen is that, upon failure, the code in the
create method will perform a redirect to the new method, rather than
just a render of the action new
This topic is locked and can not be replied to.