I have a page where user can register him/herself to the site.
If the user enters something wrong, or leaves blank textboxes, I want to
reload the page and tell the user what went wrong. Also the
textbox-values the user already entered, should be kept in the
For example, in my user-controller:
if @username.length == 0
redirect_to :action => ‘registeruser’, :message => “You must give an
This gives the url:
“/user/registeruser?message=You+must+give+an+username” and I can show
the message with <%=h @params[‘message’]%>.
Is this THE way to go, just add the values from textboxes to the url
also? Or is there a way I can do this without using the url-parameters?