link_to method in rails

 link_to method in rails


.......................................................................................


Deleting Comments


<p>
  <%= link_to 'Destroy Comment', [comment.article, comment]
               method: :delete,
            data: { confirm: 'Are you sure?' } %>
</p>


<%= link_to 'Edit', edit_article_path(@article) %> |
<%= link_to 'Back', articles_path %>
<td><%= link_to 'Show', article_path(article) %></td>





<%= link_to 'New article', new_article_path %>


<h1>Hello, Rails!</h1>
<%= link_to 'My Blog', controller: 'articles' %>



Comments

Popular posts from this blog

Rails 7 Features :: Comparison with Rails 6 and Rails 5