Martyn W. wrote in post #1071177:
> I have a 'has many through' relationship in my models. I am trying to
> access objects from either side of this relationship, with mixed
> results.Here are my models:
>
> class Material < ActiveRecord::Base
> attr_accessible :description, :number
>
Please remember to quote the previous message so that it is easier to
follow the thread, remember this is a mailing list not a forum (though
you may be accessing it through a forum like interface).
On 3 August 2012 17:02, Martyn W. wrote:
> For <%= work_ticket.material.number %>
>
> I get undefin
For <%= work_ticket.material.number %>
I get undefined method `number' for nil:NilClass
--
Posted via http://www.ruby-forum.com/.
--
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@goo
3 matches
Mail list logo