Reputation: 15416
I am super fresh to Rails, but came across a problem I can't wrap my head around.
I have a link using the link_to helper method:
<%= link_to("Link", {:controller => 'gitrevision_download', :project_id => @project.id, :rev => @rev}) %>
That link then takes me to a new page and invokes the gitrevision_download controllers index method. All I want to do is render that index template within the template I'm already in, rather then as a link.
Edit: Just realised this function isn't working how I thought it did It's displaying the data after the link is called, and the routes handler must be redirecting me to the correct controller.
So what I need is to render the index view from that controller, from another controller. Is that bad practice?
Upvotes: 1
Views: 676
Reputation: 16064
The best place to go for explanations of Rails functionality is the documentation; it's really surprisingly well done!
To answer your question more directly:
<a class="specified-classes" title="specified-title" ...>
and so on.Upvotes: 5