Permalink
Browse files

Merge pull request #11189 from jetthoughts/destroy_link_description_f…

…or_getting_started

Added clarification for destroy link_to description in 5.14
  • Loading branch information...
2 parents bb1feb0 + 17b01b8 commit e9ba6eca657d44e7ba47410253daff3830e414fc @senny senny committed Jun 30, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 guides/source/getting_started.md
@@ -1062,7 +1062,7 @@ You can call `destroy` on Active Record objects when you want to delete
them from the database. Note that we don't need to add a view for this
action since we're redirecting to the `index` action.
-Finally, add a 'destroy' link to your `index` action template
+Finally, add a 'Destroy' link to your `index` action template
(`app/views/posts/index.html.erb`) to wrap everything
together.
@@ -1088,8 +1088,8 @@ together.
</table>
```
-Here we're using `link_to` in a different way. We pass the named route as the first argument,
-and then the final two keys as another argument. The `:method` and `:'data-confirm'`
+Here we're using `link_to` in a different way. We pass the named route as the second argument,
+and then the options as another argument. The `:method` and `:'data-confirm'`
options are used as HTML5 attributes so that when the link is clicked,
Rails will first show a confirm dialog to the user, and then submit the link with method `delete`.
This is done via the JavaScript file `jquery_ujs` which is automatically included

0 comments on commit e9ba6ec

Please sign in to comment.