title: Rails - HTTP to HTTPS (or vice versa) redirect adding extra params
body: <p>I am using Sslrequirements.rb (and modified it to suit my needs), now when a page goes to HTTP to HTTPS, it adds extra params. Question is how do I retain the correct parameters that are being passed and how do I make sure the controller and action name that is being passed does not go along with URL.</p>
  
  <p>When this following block is invoked</p>
  
  <pre><code>redirect_to :protocol =&gt; "https://", :controller =&gt; controller_name.to_sym, :action =&gt; action_name.to_sym, :params =&gt; params
  </code></pre>
  
  <p>Signup page is being invoked with these parameters. </p>
  
  <pre><code>https://mydomain.com/signup?account=free&amp;action=new&amp;controller=users
  </code></pre>
  
  <p>How do I get rid of <code>&amp;action=new</code> and <code>controller=users</code> from the invoked URL. </p>
  
  <p>I am using Rails 3.2.6.</p>