title: Passing Parameters using redirect in rails controller method
body: <p>I have this controller method:</p>
  
  <pre><code>def slide_change
   j=params[:val]
   g=TargetPortfolio.new
   @h,@lock=g.finding_the_concerned_id(j)
   #@h , @lock both are array. 
   last=TargetPortfolio.last  # TargetPortfolio is model class
   last.update_attributes(folders: @h)
   redirect_to :action =&gt; "target_port" #with this i need to pass @lock as argument
  end
  </code></pre>
  
  <p>The other method target_port of controller:</p>
  
  <pre><code>def target_port
   @h=TargetPortfolio.last.folders
   # @lock from the slide_change
  end 
  </code></pre>
  
  <p>Available routes</p>
  
  <pre><code>slide_change GET  /slide_change(.:format)                Portfolio#slide_change
   /:controller(/:action(/:id))(.:format) :controller#:action
  </code></pre>
  
  <p>I have target_port.erb which uses @h and @lock .Any guesses how i can do that.</p>