Skip to content

Commit 40b1c60

Browse files
Merge pull request rails#46752 from swanson/forgery-docs-update
Update RequestForgeryProtection docs to encourage wrapper method for skipping [ci-skip]
2 parents d2391f3 + a7bbbc1 commit 40b1c60

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

actionpack/lib/action_controller/metal/request_forgery_protection.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,11 @@ module ClassMethods
111111
# protect_from_forgery except: :index
112112
# end
113113
#
114-
# You can disable forgery protection on controller by skipping the verification before_action:
114+
# You can disable forgery protection on a controller using skip_forgery_protection:
115115
#
116-
# skip_before_action :verify_authenticity_token
116+
# class BarController < ApplicationController
117+
# skip_forgery_protection
118+
# end
117119
#
118120
# Valid Options:
119121
#

0 commit comments

Comments
 (0)