How do I pass data from index page back to index page?


I currently have this in my view:
<%= link_to h(, :controller => ‘categories’, :action
=> ‘show’, :id => %>

however I do not want to go to the categories controller. I would much
rather go back to public controller/view/layout (my index page) and
display the information there.

So I am a bit lost being new to rails as to how to pass parameters in
order to call any data the user is asking for.

For instance, if someone clicks on a category - display in the main
column of the page the content for that category - if they click on a
sub category - display content for that and so on.

I was thinking I would need to do this in the view (actually its a
<%= link_to h(, :controller => ‘public’, :action =>
‘show’, :id => %>

and then in the public controller do
def show
I am not sure what to put here in order to make is universal to all