title: Param in URL not passed to a form - Rails 4
body: <p>When accessing URL <code>localhost:3000/buyers/sign_up?email=abc%40abc.com</code> , the sign-up form is displayed but email field stays empty and is not auto-filled with abc@abc.com.
  Could this be related to the implemented Single Table Inheritance (STI) ? -> Buyer inherits from User.</p>
  
  <p><strong>routes.rb</strong></p>
  
  <pre><code>  devise_for :users, :controller =&gt; {:sessions =&gt; 'sessions'}, :skip =&gt; :registrations do
      delete '/logout', :to =&gt; 'sessions#destroy', :as =&gt; :destroy_user_session
      get '/login', :to =&gt; 'sessions#new', :as =&gt; :new_user_session
      post '/login', :to =&gt; 'sessions#create', :as =&gt; :new_user_session
    end
  
    devise_for :sellers, :skip =&gt; :sessions
    devise_for :buyers, :skip =&gt; :sessions
    resources :users
  </code></pre>
  
  <p><strong>devise/registrations/new.html.erb</strong></p>
  
  <pre><code>&lt;%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %&gt;
    &lt;%= devise_error_messages! %&gt;
  
    &lt;div&gt;&lt;%= f.label :email %&gt;&lt;br /&gt;
    &lt;%= f.email_field :email, autofocus: true %&gt;&lt;/div&gt;
  
    &lt;div&gt;&lt;%= f.submit "Sign up" %&gt;&lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p><strong>users_controller</strong></p>
  
  <pre><code>class UsersController &lt; ApplicationController
    before_action :set_user, only: [:show, :edit, :update, :destroy]
  
  
  def create
      @user = User.new(user_params)
  
      respond_to do |format|
        if @user.save
          format.html { redirect_to @user, notice: 'User was successfully created.' }
          format.json { render action: 'show', status: :created, location: @user }
        else
          format.html { render action: 'new' }
          format.json { render json: @user.errors, status: :unprocessable_entity }
        end
      end
    end
  
  private
      # Use callbacks to share common setup or constraints between actions.
      def set_user
        @user = User.find(params[:id])
      end
  
      # Never trust parameters from the scary internet, only allow the white list through.
      def user_params
        params.require(:user).permit(:first_name, :last_name, :name, :type, :email)
      end
  end
  </code></pre>