Class: SportDbAdmin::CountriesController
- Inherits:
-
SportDbAdminController
- Object
- ActionController::Base
- SportDbAdminController
- SportDbAdmin::CountriesController
- Defined in:
- app/controllers/sport_db_admin/countries_controller.rb
Instance Method Summary collapse
-
#index ⇒ Object
GET /countries.
-
#shortcut ⇒ Object
GET /:key e.g /at or /us etc.
-
#show ⇒ Object
GET /countries/1.
Instance Method Details
#index ⇒ Object
GET /countries
8 9 10 |
# File 'app/controllers/sport_db_admin/countries_controller.rb', line 8 def index @countries = Country.all end |
#shortcut ⇒ Object
GET /:key e.g /at or /us etc.
13 14 15 16 |
# File 'app/controllers/sport_db_admin/countries_controller.rb', line 13 def shortcut @country = Country.find_by_key!( params[:key] ) render :show end |
#show ⇒ Object
GET /countries/1
19 20 21 |
# File 'app/controllers/sport_db_admin/countries_controller.rb', line 19 def show @country = Country.find( params[:id] ) end |