instance method
code_with_name
Ruby on Rails 7.2.3
Since v5.2.8.1 PrivateSignature
code_with_name(code_or_name)
No documentation comment.
Parameters
-
code_or_namereq
Source
# File actionpack/lib/action_dispatch/testing/assertions/response.rb, line 105
def code_with_name(code_or_name)
if RESPONSE_PREDICATES.value?("#{code_or_name}?".to_sym)
code_or_name = RESPONSE_PREDICATES.invert["#{code_or_name}?".to_sym]
end
AssertionResponse.new(code_or_name).code_and_name
end
Defined in actionpack/lib/action_dispatch/testing/assertions/response.rb line 105
· View on GitHub
· Improve this page
· Find usages on GitHub