title: Ruby/Rails - Is there a workaround for this double render error ( Render + Redirect )
body: <p>I have an issue where I think I need to use both a redirect and a render within the same action and I keep getting the double render error so I wondered if anyone could see another way.</p>
  
  <p>I have a form with a select box and a button that allows users to choose from a set of cities to navigate to.</p>
  
  <pre><code>&lt;%= form_tag root_path, :method =&gt; :post do %&gt;
    &lt;%= select_tag :city, options_for_select(%w{ Pittsburgh Philadelphia Austin }) %&gt;
    &lt;%= submit_tag "Change City" %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>and in the controller, I check for the city parameters then redirect to the desired page.</p>
  
  <pre><code>def index
    if params[:city] == "Pittsburgh"
      redirect_to pittsburgh_path
    elsif params[:city] == "Philadelphia"
      redirect_to philadelphia_path
    elsif params[:city] == "Austin"
      redirect_to austin_path         
    end
    render :layout =&gt; false
  end
  </code></pre>
  
  <p>But on this page I've created a specific layout/design which is only on that page so I just turned off the application layout.</p>
  
  <p>Can I perform the navigation actions and turn off the rendering of the application layout at the same time?</p>