Skip to content

Commit f7cc8b3

Browse files
committed
Move up the notice to the line of :with explanation
1 parent be31560 commit f7cc8b3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

actionpack/lib/action_controller/metal/request_forgery_protection.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,12 @@ module ClassMethods
129129
#
130130
# If you need to add verification to the beginning of the callback chain, use <tt>prepend: true</tt>.
131131
# * <tt>:with</tt> - Set the method to handle unverified request.
132+
# Note if <tt>default_protect_from_forgery</tt> is true, Rails call protect_from_forgery with <tt>with :exception</tt>.
132133
#
133134
# Built-in unverified request handling methods are:
134135
# * <tt>:exception</tt> - Raises ActionController::InvalidAuthenticityToken exception.
135136
# * <tt>:reset_session</tt> - Resets the session.
136137
# * <tt>:null_session</tt> - Provides an empty session during request but doesn't reset it completely. Used as default if <tt>:with</tt> option is not specified.
137-
# Note if <tt>default_protect_from_forgery</tt> is true, Rails call protect_from_forgery with <tt>with :exception</tt>.
138-
# This might not be intuitive as the method itself treats <tt>:with</tt> as <tt>:null_session</tt> by default.
139138
#
140139
# You can also implement custom strategy classes for unverified request handling:
141140
#

0 commit comments

Comments
 (0)