-2

I'm trying to add a link into my table, group.link holds a URL and I want to make this into a clickable link. This is what I've tried to do so far but it isn't correct:

- @groups.each do |group|
  %tr
    %td= group.name
    %td= group.description
    %td= #{link_to group.link}

Thanks in advance!

ChatNoir
  • 415
  • 8
  • 18

1 Answers1

2

Try this:

- @groups.each do |group|
  %tr
    %td= group.name
    %td= group.description
    %td= link_to "Click", group.link
Uzbekjon
  • 11,655
  • 3
  • 37
  • 54