On Sat, Jul 21, 2012 at 5:11 PM, James Harris <li...@ruby-forum.com> wrote:
> Ahh. this works ok in my show view because it looks for only one record
> for the id. How do I show the correct company name for each contact row
> in my list table of all contacts which have a belongs_to :company
> association.

If your associations are correct, you should be able to use e.g.
`contact.company.company_name` .

Open up a console and try it.
-- 
Hassan Schroeder ------------------------ hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

-- 
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-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to