Hello,
I currently have this in my view:
<%= link_to h(sub_category.name), :controller => ‘categories’, :action
=> ‘show’, :id => sub_category.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
partial):
<%= link_to h(sub_category.name), :controller => ‘public’, :action =>
‘show’, :id => sub_category.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
data.
end