title: How to properly pass parameter in query string with redirect_to? (Rails 4)
body: <p>I'm building a contact form creation app with rails 4.</p>
  
  <p>Users can create contact forms (called <code>Contactable</code> in app), which when submitted creates a <code>Contact</code> and redirects the contact to the URL the user specifies.</p>
  
  <p>I'm trying to pass the contact's email address through the redirect as a query string.</p>
  
  <p>With my current setup, the email does get passed in the query string but it loses the "@" symbol.</p>
  
  <p>If a contact form is submitted with an an example email like john@website.com, the query string gets built like this...</p>
  
  <pre><code>http://website.com/?email=johnwebsite.com
  </code></pre>
  
  <p>As you can see, it loses the '@' character. How can I keep that @ character?</p>
  
  <p>In the Contact controller's create function, here is how I'm building the query string...</p>
  
  <pre><code>respond_to do |format|
    if @contact.save
      if @contactable.redirect_url.present?
        format.html { redirect_to @contactable.redirect_url + '?email=' + @contact.email }
        format.json { render :show, status: :created, location: @contact }
      else
        format.html { redirect_to :back, notice: @contactable.thanks_message }
        format.json { render :show, status: :created, location: @contactable }
      end
    else
      format.html { render :new }
      format.json { render json: @contact.errors, status: :unprocessable_entity }
    end
  end
  </code></pre>
  
  <p>Thanks for any input!</p>