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.

Need Your Help

Rope and Yasnippet in Emacs

python emacs elisp rope yasnippet

I setup python support for emacs using rope and yasnippet by following the tutorial given at

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.