link_to

<%= link_to "Click me", controller: "pages", action: "home" %>

Explanation:

  1. <%=: Embeds Ruby code in the view to evaluate and output the result.

  2. link_to: A helper method in Ruby on Rails for creating links.

  3. "Click me": The anchor text or content of the link that the user will see.

  4. controller: "pages": Specifies the controller to handle the request, in this case, the "pages" controller.

  5. action: "home": Specifies the action within the controller to be invoked, in this case, the "home" action.

  6. %>: Closes the embedded Ruby code block.