DEV Community

Vasily Polovnyov
Vasily Polovnyov

Posted on

Rack application as a stub

Sometimes you need to put a stub on a particular route, but do not want to make a controller for this. In this case use Rack application as a stub:

# config/routes.rb
get "wp-login", to: -> (env) { [200, {}, [""]] }
Enter fullscreen mode Exit fullscreen mode

Discussion (0)