Disclaimer: Rails newbie working on my first app. Came from Java-land (WebObjects, not J2EE). Just starting to really code and I want to produce HTML like this: <a href="/admin/issue" title="Issues">Issues</a> Right now I have: <%= link_to "Issues", :controller => "issue", :action => "index" %> How can I get the title into the rendered HTML? I tried to Google this and look in the Agile book to no avail. Cheers, Hunter
From: "Hunter Hillegas" <lists-HAWAbpnI61OZ1JSuHaJ1sQC/G2K4zDHf-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org>> Just starting to really code and I want to produce HTML like this: > > <a href="/admin/issue" title="Issues">Issues</a> > > Right now I have: > > <%= link_to "Issues", :controller => "issue", :action => "index" %> > > How can I get the title into the rendered HTML?This should work: <%= link_to "Issues", {:controller => "issue", :action => "index"}, {:title => "Issues"} %> Hope that helps! Jen
From: "Hunter Hillegas" <lists-HAWAbpnI61OZ1JSuHaJ1sQC/G2K4zDHf-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org>> Just starting to really code and I want to produce HTML like this: > > <a href="/admin/issue" title="Issues">Issues</a> > > Right now I have: > > <%= link_to "Issues", :controller => "issue", :action => "index" %> > > How can I get the title into the rendered HTML?Try this: <%= link_to "Issues", {:controller => "issue", :action => "index"}, {:title => "Issues"} %> Also, if you wanted it to go to /admin/issue, did you mean to use :controller => "admin"? Hope that helps! Jen