Sha256: 982bb38e41022939c21b25f239882aeef90f76cc04460dd59b335d93a6e06e45
Contents?: true
Size: 613 Bytes
Versions: 2
Compression:
Stored size: 613 Bytes
Contents
# encoding: utf-8 module WorldDbAdmin class CitiesController < WorldDbAdminController # GET /cities def index order = params[:order] @cities = case order when 'pop' then City.by_pop.all when 'popm' then City.order( 'popm desc' ).all when 'title' then City.by_title.all else City.by_key.all end end # GET /:key def shortcut ## for now just redirect to cities page w/ anchor includes e.g cities/#newyork redirect_to cities_path( :anchor => params[:key] ) end end # class CitiesController end # module WorldDbAdmin
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
worlddb-admin-0.1.1 | app/controllers/world_db_admin/cities_controller.rb |
worlddb-admin-0.1.0 | app/controllers/world_db_admin/cities_controller.rb |