I have a model ("Ups")  and a corresponding controller
("UpsController"). The Ups model has a link to my "channels" toble
through channel_id

Everything I am going to do in the given views for Ups have to do with
using those ups from a selected channel. Thus, I am putting a partial
at the top of the views, with a select box to choose the channels:


<div id="uplognavlist">
<% form_for :ups, :html => {:name => 'channelsform'},:url=>{ :action
=>"newchannel", :controller =>"ups"} do |f| %>
    <%= f.label :channel_id %>
        <%= select("channel", "channel_id", Channel.find(:all,  :order =>
'channel ASC',  :conditions => ['deleted=0']).collect {|p|
[ p.channel, p.id ]}, {:include_blank => true}) %>
        <%= f.submit "Change" , :class=>'button' %>
<% end %>
        <%= links_for_uplog %>
</div>

My question is, within my UpsController.newchannel(), how do I access
the calue of the channel_id that has been selected in the form
submission?

Incidentally, if you look at the erb code I put above, there is a line
feed that gets inserted after the submit button, before the next
section " links_for_uplog " within the div. How can I not have that?

Thanks, Janna
--~--~---------~--~----~------------~-------~--~----~
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