I am new to ruby on rails and active admin, I need to create two dropdown list one is location and another one is game.
The game is based on location so if I select a location from dropdown list it should display games which are related to that particular location in the second drop down.
Can you help me ?
form do |f|
f.inputs do
f.input :location_id, :as => :select, :collection => Location.all.collect {|var| [var.location, var.id] }
f.input :game_id, :as => :select, :collection => Game.all.collect {|var| [var.game, var.id] }
end
f.actions
end