Class: BeerDbAdmin::CitiesController
- Inherits:
-
BeerDbAdminController
- Object
- ActionController::Base
- BeerDbAdminController
- BeerDbAdmin::CitiesController
- Defined in:
- app/controllers/beer_db_admin/cities_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
7 8 9 |
# File 'app/controllers/beer_db_admin/cities_controller.rb', line 7 def index @cities = City.all end |
#shortcut ⇒ Object
16 17 18 19 20 21 22 |
# File 'app/controllers/beer_db_admin/cities_controller.rb', line 16 def shortcut # todo/fix: check if city key is unique ? or needs country or region?? @city = City.find_by_key!( params[:key] ) render :show end |
#show ⇒ Object
11 12 13 |
# File 'app/controllers/beer_db_admin/cities_controller.rb', line 11 def show @city = City.find( params[:id] ) end |