Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8904733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:12:34+00:00 2026-06-15T02:12:34+00:00

I finally came to ask this question since I found no answer and it

  • 0

I finally came to ask this question since I found no answer and it kept bothering me. What’s the reason behind this behavior ? Is it REST-thingy-driven 🙂 ?

I found this “workaround” but no explanation : How to make a render :edit call show the /edit in the address bar

Thanks


EDIT

My question was not that well written, sorry. Why the default Rails behavior is not to redirect to the edit template? That would feel more logical, to me at least 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:12:36+00:00Added an answer on June 15, 2026 at 2:12 am

    render doesn’t redirect, so there’s no reason the URL bar address would change.

    The default update method looks like this:

      # PUT /posts/1
      # PUT /posts/1.json
      def update
        @post = Post.find(params[:id])
    
        respond_to do |format|
          if @post.update_attributes(params[:post])
            format.html { redirect_to @post, notice: 'Post was successfully updated.' }
            format.json { head :no_content }
          else
            format.html { render action: "edit" }
            format.json { render json: @post.errors, status: :unprocessable_entity }
          end
        end
      end
    

    The URL is /posts/1, which is what displays in the URL bar. If update_attributes fails, e.g., a validation error, it renders the "edit" template, with no redirect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was always wondering about this and today I have finally came to a
This question came about because code that worked previously in .NET 4.0 failed with
Searched for this everywhere and finally came here. I have a CORBA::WString_var as input
I'm finally learning regexps and training with ack . I believe this uses Perl
Hy, I would like to ask a question that puzzles me. I've a class
I want to perform I/O operation on channels using ByteBuffer . Finally I came
In Galvin, I came across Finally, many operating system kernels are now multithreaded; several
I hate to ask the same question others have asked in Stackoverflow, but I
I finally came to my last part.. and I'm stuck.. In my orderlist.txt file
I'm aware that is a rather difficult question to answer, mainly because there's so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.