title: Passing model instance variable from one controller to another in redirect_to in Rails
body: <p>I am using Rails version 3.2.10. I am trying to pass a model instance variable with many attributes in it from one action to another action in different controller.   </p>
  
  <p>I have tried many things, but not getting a solution.  </p>
  
  <p>First controller method:</p>
  
  <pre><code>def create
  if current_user
    auth = request.env["omniauth.auth"]
    @applicant = Applicant.new
    if (auth['provider'] == "linkedin")
      puts auth.info.image
      linkedinProfileImport(auth)
      @applcant.first_name = auth.info.first_name
      @applcant.second_name = auth.info.last_name
  
     redirect_to controller =&gt; 'job_applicants', :action =&gt; 'newProfile' , :id =&gt; params[:id]
      end   
  </code></pre>
  
  <p>Second controller method:</p>
  
  <pre><code> def newProfile
   @job = Job.find_by_id(params[:id])
   puts @job.id
   @applicant = Applicant.new
   @applicant = @applicant
  </code></pre>
  
  <p>end  </p>
  
  <p>I have to access the <code>@ applicant</code> variable from first controller into second controller method.  </p>