Hi I have in routes.rb like map.resources :users Now I am trying to edit a user. What the url shows now is http://localhost:3000/users/1/edit But my problem is , when I click on update button and if validations fail I am re rendering the edit page. And it happens properly. But the url becomes
http://localhost:3000/users/1 I can't figure it out . Please give a solution. Why this happens? So if a user goes to url and press enter it will show Unknown action No action responded to show. Actions: create, edit, new, and update My controller code for update is def update @user = User.find(params[:id]) respond_to do |format| if @user.update_attributes(params[:user]) flash[:notice] = 'User was successfully updated.' format.html { redirect_to home_url } format.xml { head :ok } else flash.now[:error] = @user.errors.full_messages.join("<br />") format.html { render :action => "edit" } format.xml { render :xml => @user.errors, :status => :unprocessable_entity } end end end Thanks in advance Tom -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.