On 17 Jul 2010, at 14:24, RichardOnRails 
<richarddummymailbox58...@uscomputergurus.com> wrote:

> Hi Fred,
> 
> Thanks for taking the trouble to respond again, especially since I
> failed to follow your previous response.  The problem then was that I
> was unsuccessful in applying it or didn't understand it ... probable
> both.  I definitely failed to realize that the argument (object) was
> to be omitted in the context of form elements.  That "little detail"
> seems missing in ActionView::Helpers::FormOptionsHelper.  Someone
> explicitly mentioned that in a subsequent post on this thread.
> 
It's definitely in the form helpers guide - well worth reading (there's also a 
section on collection_select and association type mismatch errors)

> I also tried using the symbol :vendor_id as the first arg.   That
> failed, too.
> 
That's what you should be doing - how did it fail?

Fred


> I apologize for being so obtuse.  But I'd really like to get this app
> working,  and getting this expense-vendor hookup working may be my
> last obstacle (for a while, anyway).
> 
> If you can give me a little more help about this problem, I'd be most
> appreciative.  If you need more info,  I'd be happy to post portions
> or all my code to a website from which you could download it for
> inspection.
> 
> Best wishes,
> Richard
> 
> 
> On Jul 17, 5:29 am, Frederick Cheung <frederick.che...@gmail.com>
> wrote:
>> On Jul 16, 10:40 pm, RichardOnRails
>> 
>> <richarddummymailbox58...@uscomputergurus.com> wrote:
>>> Hey Colin,
>> 
>>> Here's one more detail I should have added from my new-expense-view
>>> code:
>> 
>>>     <%= f.label :vendor %><br />
>> 
>>>     <%# New version of vendor selection -%>
>>>     <% params[:expense] = 10 -%>
>>>     <% @vendors = Vendor.find( :all, :order=>"nickname ASC") -%>
>>>     <%= f.collection_select(:id, @vendors, :id, :nickname) %>
>> 
>> because the first argument should be the name of the attribute you are
>> trying to set (ie vendor_id). This and f.collection_select not needing
>> the first argument was on the link I gave on one of your other posts
>> (http://guides.rubyonrails.org/form_helpers.html)
>> 
>> Fred
>> 
>>>     <%# End of New version -%>
>> 
>>> I apologize for the fragmented response.  I was in a hurry to go out
>>> for my 3-mile walk :-)
>> 
>>> Best again,
>>> Richard
> 
> -- 
> 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 rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
> 

-- 
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to