added weather to places

This commit is contained in:
Aaro Koivukangas
2023-12-06 15:33:01 +02:00
parent 7f94ce7b88
commit 36a8355ef4
4 changed files with 50 additions and 1 deletions
+2
View File
@@ -4,6 +4,8 @@ class PlacesController < ApplicationController
def search
@places = BeermappingApi.places_in(params[:city])
@weather = Place.weather params[:city]
@city = params[:city]
if @places.empty?
redirect_to places_path, notice: "No locations in #{params[:city]}"
else