I have a partial in my view which has a select box:

<% form_for :channels, :html => {:name => 'channelsform'},:url=>
{ :action =>"newchannel", :controller =>"channels"} do |f| %>

<%= f.select(:id , Channel.find(:all,  :order => 'channel
ASC',  :conditions => ['deleted=0']).collect {|p| [ p.channel,
p.id ]}, {:include_blank => true}, { :onchange =>
"document.channelsform.submit();"}) %>

In  my ChannelsController I pick up the value from this select box
correctly as: @channel = Channel.find(params[:channels][:id])

However, when the partial rerenders, it doesn;t show the selected
value. How can I make it show the selected value, given the syntax for
the form.select I have used?

Thanks, Janna B
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to