модуль ActionDispatch::Integration::RequestHelpers
Публичные методы экземпляров
# File actionpack/lib/action_dispatch/testing/integration.rb, line 41 def delete(path, **args) process(:delete, path, **args) end
Выполняет запрос DELETE с заданными параметрами. Подробнее см. ActionDispatch::Integration::Session#process.
# File actionpack/lib/action_dispatch/testing/integration.rb, line 54
def follow_redirect!
raise "not a redirect! #{status} #{status_message}" unless redirect?
get(response.location)
status
end Выполняет переадресацию по одному ответу. Если последний ответ не был переадресацией, будет возбуждено исключение. В противном случае переадресация выполняется по заголовку location.
# File actionpack/lib/action_dispatch/testing/integration.rb, line 17 def get(path, **args) process(:get, path, **args) end
Выполняет запрос GET с заданными параметрами. Подробнее см. ActionDispatch::Integration::Session#process.
# File actionpack/lib/action_dispatch/testing/integration.rb, line 47 def head(path, *args) process(:head, path, *args) end
Выполняет запрос HEAD с заданными параметрами. Подробнее см. ActionDispatch::Integration::Session#process.
# File actionpack/lib/action_dispatch/testing/integration.rb, line 29 def patch(path, **args) process(:patch, path, **args) end
Выполняет запрос PATCH с заданными параметрами. Подробнее см. ActionDispatch::Integration::Session#process.
# File actionpack/lib/action_dispatch/testing/integration.rb, line 23 def post(path, **args) process(:post, path, **args) end
Выполняет запрос POST с заданными параметрами. Подробнее см. ActionDispatch::Integration::Session#process.
# File actionpack/lib/action_dispatch/testing/integration.rb, line 35 def put(path, **args) process(:put, path, **args) end
Выполняет запрос PUT с заданными параметрами. Подробнее см. ActionDispatch::Integration::Session#process.
© 2004–2018 David Heinemeier Hansson
Licensed under the MIT License.