search for: selstat

Displaying 1 result from an estimated 1 matches for "selstat".

Did you mean: setstat
2012 May 28
4
How to load a selection list into the method new of a controller?
...on... When I create a new institution, I have to select a city from a drop-down list. But I need to constrain this list with the state the cities belong to. So I tried this way: routes.rb: Application.routes.draw do get "states/index" resources :institutions do post ''selstate'' end resources :cities resources :states, only: :index rake routes: states_index GET /states/index(.:format) states#index institution_selstate POST /institutions/:institution_id/selstate(.:format) institutions#selstate...