Passing object between actions

Hi
I have

<%= link_to_remote “Associate Knowledgebase”,
:update => “show_sd_knowledgebase”,
:url => { :controller =>
‘service_desk’,:action => :search_knowledge_base_ui, :id => @sd_ticket }
%>

And this page is completely inside the div show_sd_knowledgebase and
contains @sd_knowledge_bases which is the result obtained from
Sd_knowledgebases table find.I need to pass this array to action
search_knowledge_base_ui This is to avoid finding the table again and
again.How can I do that?

Thanks in advance
Sijo

Sijo Kg wrote:

And this page is completely inside the div show_sd_knowledgebase and
contains @sd_knowledge_bases which is the result obtained from
Sd_knowledgebases table find.I need to pass this array to action
search_knowledge_base_ui This is to avoid finding the table again and
again.How can I do that?

It is customary to hold small pieces of data in the session. The
controller action adds something to the session before rendering the
view and the next action reads the data.

I say small because it is highly unwise to preserve large or complex
data (such as models) like this. There is an excellent RailsCast on the
subject:

http://railscasts.com/episodes/13

You can also add data into the link_to_remote call using :with or as
parameters to the URL in the :url option. Again, this is not considered
best practice for complex data. Remember that if the data comes from
the database, it could change before the user selects the link making
the cached information out of date and hence invalid…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs