Browse files

Updated form rails guide for new place of authenticity_token option

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
  • Loading branch information...
1 parent 65e08cf commit 7a774259010acec2a3b4c85e1a4b3289e4010ba8 @tukan tukan committed with spastorino Feb 7, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 railties/guides/source/form_helpers.textile
View
6 railties/guides/source/form_helpers.textile
@@ -782,18 +782,18 @@ Sometimes when you submit data to an external resource, like payment gateway, fi
<% end %>
</erb>
-The same technique is available for the +form_for+ too. You need just to set an +authenticity_token+ through +html+ options:
+The same technique is available for the +form_for+ too:
<erb>
-<%= form_for @invoice, :url => external_url, :html => { :authenticity_token => 'external_token' } do |f|
+<%= form_for @invoice, :url => external_url, :authenticity_token => 'external_token' do |f|
Form contents
<% end %>
</erb>
Or if you don't want to render an +authenticity_token+ field:
<erb>
-<%= form_for @invoice, :url => external_url, :html => { :authenticity_token => false } do |f|
+<%= form_for @invoice, :url => external_url, :authenticity_token => false do |f|
Form contents
<% end %>
</erb>

0 comments on commit 7a77425

Please sign in to comment.