class WeatherController

WeatherController

Single-resource controller that powers the weather search page.

Routes

GET / → index (root) GET /weather/search → search → redirects to root with address param

Flow

  1. User lands on the root page (empty search).

  2. Submitting the search form hits search, which redirects back to root with the +address+ query parameter.

  3. index detects the address, calls {Services::Application::WeatherByAddress} to geocode and fetch weather, and assigns +@result+ for the view.

  4. On error, +@error+ is set and shown in the +_error+ partial.