title: Passing params[:thing] to another function
body: <p>So, i got the following code to parse a CSV file:</p>
  
  <pre><code>CSV.foreach(params[:file]) do |row|
      #bingbangbong
  end
  </code></pre>
  
  <p>But I have two functions, one for show the CSV parsed file, and another one to save it on a db.</p>
  
  <p>My question is: How can I pass the <code>params[:file]</code> var to another function, something like this:</p>
  
  <pre><code>def show_CSV
      CSV.foreach(params[:file]) do |row|
          #Showing the parsed CSV
      end
  end
  
  def save_CSV
      CSV.foreach(params[:file]) do |row|
          #Showing the parsed CSV
      end
  end
  </code></pre>
  
  <p>But, without making the user to upload the file again.</p>