In a view file I have:
= link_to \'View\', post = link_to \'View\', comment
In a spec file (I\'m using Capybara):
click_on
This works for me if you have several rows of identical classes and you want to find the second row. Like a previous author mentioned, capybara indexing starts at 1.
within all(".trip-row")[2] do assert page.has_content?("content") end