Link_to syntax question

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?

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.

<%= link_to h(‘Title of post’), forum_posts_path(@forum) %>

“h” is just a function call

On Mar 18, 2:48 pm, Dan S. [email protected]

Whenver I put any ruby code in the ''s of link_to, I get a page full of

show me thy code

On Mar 18, 3:37 pm, Dan S. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs