app/controllers/ishapi/venues_controller.rb in ishapi-0.1.8.40 vs app/controllers/ishapi/venues_controller.rb in ishapi-0.1.8.41
- old
+ new
@@ -3,9 +3,13 @@
class VenuesController < ApplicationController
def index
authorize! :index, ::Venue
@venues = ::Venue.all
+ if params[:cityname]
+ city = City.find_by :cityname => params[:cityname]
+ @venues = @venues.where( :city => city )
+ end
end
def show
@venue = Venue.find_by :name_seo => params[:venuename]
authorize! :show, @venue