the following is my dropdown to select chat rooms:
<% form_for :chat_room do |form| %> <%= form.select(:title, @chat_rooms.collect! {|x| x.title},{:include_blank =>'select a chat room'}) %> <% end %>
My routes are:
ActionController::Routing::Routes.draw do |map| map.resource :account, :controller => 'users' map.resources :poll map.resources :users,:has_many => :stories map.resources :chat_rooms ,:member => {:create_message => :post},:collection => {:ajax_updater=>:get} map.logout 'logout', :controller => 'user_sessions', :action =>'destroy' map.resource :user_session map.resource :welcome map.connect '/', :controller => 'welcome', :action => 'index' map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' end
On changing values in the drop down I want to navigate to a particular chatroom chosen. How do I do that?
one (simple) way would be to add the :onchange parameter to the select helper