Skip to content

Commit

Permalink
update document to fix delete
Browse files Browse the repository at this point in the history
  • Loading branch information
jacklynhma committed Oct 19, 2023
1 parent b9b86fe commit c71ead6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sites/intro-to-rails/allow_people_to_vote.step
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ steps {
<td><%= button_to '+1', upvote_topic_path(topic), method: :post %></td>
<td><%= link_to 'Show', topic %></td>
<td><%= link_to 'Edit', edit_topic_path(topic) %></td>
<td><%= link_to 'Delete', topic, data: { turbo_method: :delete, turbo_confirm: 'Are you sure?' } %></td>
<td><%= link_to 'Destroy', topic, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ steps {
step "Change 'destroy' to 'delete'" do

message "Change the line with the word 'Destroy' to this:"
source_code :erb, "<td><%= link_to 'Delete', topic, method: :delete, data: { confirm: 'Are you sure?' } %></td>"
source_code :erb, "<td><%= link_to 'Delete', topic, data: { turbo_method: :delete, turbo_confirm: 'Are you sure?' } %></td>"
end

step "Confirm your changes" do
Expand Down

0 comments on commit c71ead6

Please sign in to comment.