Class: Ishapi::VenuesController
Instance Method Summary
collapse
#home, #long_term_token, #vote
Instance Method Details
#index ⇒ Object
5
6
7
8
9
10
11
12
|
# File 'app/controllers/ishapi/venues_controller.rb', line 5
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
|
#show ⇒ Object
14
15
16
17
|
# File 'app/controllers/ishapi/venues_controller.rb', line 14
def show
@venue = Venue.find_by :slug => params[:venuename]
authorize! :show, @venue
end
|