title: How can I pass objects from one controller to another in rails?
body: <p>I have been trying to get my head around render_to but I haven't had much success.</p>
  
  <p>Essentially I have controller methods:</p>
  
  <pre><code>def first
    #I want to get the value of VAR1 here
  end
  
  def second
    VAR1 = ["Hello", "Goodbye"]
    render_to ??
  end
  </code></pre>
  
  <p>What I can't figure out is how to accomplish that. Originally I just wanted to render the first.html.erb file but that didn't seem to work either.</p>
  
  <p>Thanks</p>
  
  <p>Edit: I appreciate the answers I have received, however all of them tend to avoid using the render method or redirect_to. Is it basically the case then that a you cannot pass variables from controller to controller? I have to think that there is some way but I can't seem to find it.</p>