Skip to content

Commit

Permalink
Merge pull request #18 from adamlamar/authenticity-token-on-get
Browse files Browse the repository at this point in the history
forms using GET method ignore authenticity_token
  • Loading branch information
markbates authored Nov 3, 2017
2 parents 081bad1 + 250230b commit a70a4ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion forms.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func helper(opts tags.Options, help HelperContext, fn func(opts tags.Options) he
opts["errors"] = help.Context.Value("errors")
}
form := fn(opts)
if help.Value("authenticity_token") != nil {
if help.Value("authenticity_token") != nil && opts["method"] != "GET" {
form.SetAuthenticityToken(fmt.Sprint(help.Value("authenticity_token")))
}
ctx := help.Context.New()
Expand Down

0 comments on commit a70a4ff

Please sign in to comment.