routes.rb 586 B

12345678910111213141516171819
  1. Rails.application.routes.draw do
  2. # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
  3. get "json", to: JsonController.action(:index)
  4. get "db", to: "hello_world#db"
  5. get "queries", to: "hello_world#query"
  6. get "fortunes", to: "hello_world#fortune"
  7. get "updates", to: "hello_world#update"
  8. get "plaintext", to: ->(env) do
  9. [200,
  10. {
  11. 'Content-Type' => 'text/plain',
  12. 'Date' => Time.now.httpdate,
  13. 'Server' => 'Rails'
  14. },
  15. ['Hello, World!']]
  16. end
  17. get "cached", to: "hello_world#cached_query"
  18. end