Need quick help with view syntax


whats the correct syntax for that: (if possible)


<%=h !project.calendar.nil? ? "all good" : link_to(project.title, project) %>

im not sure of the “link_to” part.


Rather than posting such a silly question here, you could always go read
for yourself…

u know, sometimes u just dont see things clear / the code looks all the
same. sorry 4 bothering.
but thx

Tom T. wrote:

<%=h !project.calendar.nil? ? "all good" : link_to(project.title, project) %>
<%=h link_to_unless(project.calendar.nil?, project.title, project) { "all good" } %>

thx. appreciate it!

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