Q: Validating forms ... question about the URLs


When showing form errors, why is the url different to the initial url?

For example, to create a new user the url is "/user/new"

But when displaying the error form, the url becomes just "/user"

I'm using restful rails and my controller looks something like this:

      if @user.save         flash[:notice] = 'User was successfully created.'         format.html { redirect_to :users_url}       else         format.html { render :action => "new" }       end

Is there a way to make the url consistently "/user/new" ??

thanks :slight_smile:

Any ideas, anyone?

You’re not getting an answer cos it’s an easy one.

What action does your form post to?