sharing data across controller actions
I have a Controller X which basically has 3 actions new, search and result.
new action displays the form and has a search button which POST the params to the search action.
Search action calls some ruby methods to get the data and that needs to be passed to result controller which will display the data.
from search action I'm using redirect_to '/x/result', :some_data => @data
But I never get @data as part of my params in my result view.
I'm using Rails 3.1
redirect_to is an HTTP action, it will tell the browser to go elsewhere. You can only keep session variables. You should display in your search action since that is where you lookup the data.