aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2014-04-25 20:48:06 +0200
committerJon Atack <jon@atack.com>2014-04-25 20:48:06 +0200
commit10c4a3ea102f2b4c992847838da036cc76ccd3b3 (patch)
treeda9d8630a0ec651028087a582f2fadcda7fc509c /guides/source
parentccdeb43d2e06fb87c1fb84e979c4f7775e7ed105 (diff)
downloadrails-10c4a3ea102f2b4c992847838da036cc76ccd3b3.tar.gz
rails-10c4a3ea102f2b4c992847838da036cc76ccd3b3.tar.bz2
rails-10c4a3ea102f2b4c992847838da036cc76ccd3b3.zip
Fix code & grammar in Form Helpers Guide
in the "Forms to External Resources" section [skip ci]
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/form_helpers.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/guides/source/form_helpers.md b/guides/source/form_helpers.md
index 019e7d4cf5..c74b73771b 100644
--- a/guides/source/form_helpers.md
+++ b/guides/source/form_helpers.md
@@ -819,21 +819,21 @@ As a shortcut you can append [] to the name and omit the `:index` option. This i
produces exactly the same output as the previous example.
-Forms to external resources
+Forms to External Resources
---------------------------
-If you need to post some data to an external resource it is still great to build your form using rails form helpers. But sometimes you need to set an `authenticity_token` for this resource. You can do it by passing an `authenticity_token: 'your_external_token'` parameter to the `form_tag` options:
+Rails' form helpers can also be used to build a form for posting data to an external resource. However, at times it can be necessary to set an `authenticity_token` for the resource; this can be done by passing an `authenticity_token: 'your_external_token'` parameter to the `form_tag` options:
```erb
-<%= form_tag 'http://farfar.away/form', authenticity_token: 'external_token') do %>
+<%= form_tag 'http://farfar.away/form', authenticity_token: 'external_token' do %>
Form contents
<% end %>
```
-Sometimes when you submit data to an external resource, like payment gateway, fields you can use in your form are limited by an external API. So you may want not to generate an `authenticity_token` hidden field at all. For doing this just pass `false` to the `:authenticity_token` option:
+Sometimes when submitting data to an external resource, like a payment gateway, the fields that can be used in the form are limited by an external API and it may be undesirable to generate an `authenticity_token`. To not send a token, simply pass `false` to the `:authenticity_token` option:
```erb
-<%= form_tag 'http://farfar.away/form', authenticity_token: false) do %>
+<%= form_tag 'http://farfar.away/form', authenticity_token: false do %>
Form contents
<% end %>
```