How to retain values


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.



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)



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