Hi,

I'm having major trouble with a somewhat self-referencing has_many and
belongs_to set of models.

item.manufacturer correctly returns an object of type Vendor. However,
item.manufacturer.name raises an exception even though the name value
is set correctly.

I've been debugging and googling and responding to stack overflow
peeps but still to no avail.

Complete details here:
http://stackoverflow.com/questions/8774952/rails-3-1-advanced-has-many-and-belongs-to-model-joins

Please help!

thanks in advance.

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

Search Discussions

  • Colin Law at Jan 8, 2012 at 12:11 pm

    On 8 January 2012 05:04, Jordan Miller wrote:
    Hi,

    I'm having major trouble with a somewhat self-referencing has_many and
    belongs_to set of models.

    item.manufacturer correctly returns an object of type Vendor. However,
    item.manufacturer.name raises an exception even though the name value
    is set correctly.
    Show us the code where the error occurs and the full error message and trace.
    If you can show it in the console then copy/paste the console output here.

    Colin

    I've been debugging and googling and responding to stack overflow
    peeps but still to no avail.

    Complete details here:
    http://stackoverflow.com/questions/8774952/rails-3-1-advanced-has-many-and-belongs-to-model-joins

    Please help!

    thanks in advance.

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


    --
    gplus.to/clanlaw

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJan 8, '12 at 9:39a
activeJan 8, '12 at 12:11p
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Jordan Miller: 1 post Colin Law: 1 post

People

Translate

site design / logo © 2022 Grokbase