mirror of
https://github.com/iritmaximus/brewery.git
synced 2026-10-12 19:13:49 +03:00
5.5-6 implemented clickable links to places
This commit is contained in:
@@ -7,7 +7,13 @@ class PlacesController < ApplicationController
|
||||
if @places.empty?
|
||||
redirect_to places_path, notice: "No locations in #{params[:city]}"
|
||||
else
|
||||
session[:last_city_search] = params[:city]
|
||||
render :index, status: 418
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
places = BeermappingApi.places_in(session[:last_city_search])
|
||||
@place = places.select { |place| place.id == params[:id]}[0]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user