I'm working on Ruby on rails 2.3.2 and I'd like to keep the search text through postback so I can populate it after that.
Right now, the search page is called by a method called "search" on a controller. Once the search is done I render the file this way:
render :file => '/search/index', :layout => true, :use_full_path => true
I'd like to save the search on a session like this:
session[:text_to_search] = params[:txtSearch]
and then assign its value back to the textbox. The textbox is actually an html input type="text"
.
How can I do that?