Hi, I''m trying to build a simple forum and would like the post topic to be a clickable link. What would be the correct syntax to perform this? eg. Placing the value of this: <%= h post.title %> Into this, in the place of ''Title of post'' <%= link_to ''Title of post'', forum_posts_path(@forum) %> Any advice appreciated, thanks. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
ESPNDev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Mar-18 22:33 UTC
Re: link_to syntax question
<%= link_to h(''Title of post''), forum_posts_path(@forum) %> "h" is just a function call On Mar 18, 2:48 pm, Dan Smith <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi, I''m trying to build a simple forum and would like the post topic to > be a clickable link. What would be the correct syntax to perform this? > eg. > > Placing the value of this: > <%= h post.title %> > > Into this, in the place of ''Title of post'' > <%= link_to ''Title of post'', forum_posts_path(@forum) %> > > Any advice appreciated, thanks. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Whenver I put any ruby code in the ''''s of link_to, I get a page full of errors... -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
ESPNDev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Mar-18 22:41 UTC
Re: link_to syntax question
show me thy code On Mar 18, 3:37 pm, Dan Smith <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Whenver I put any ruby code in the ''''s of link_to, I get a page full of > errors... > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---