Colin Law wrote in post #1182787:
> On 12 April 2016 at 08:52, Naveed Alam <li...@ruby-forum.com> wrote:
>>> As a beginner I suggest you work right through a good tutorial in
>>> order to get the basics or Rails.  The one I suggest is
>>> railstutorial.org (which is free to use online).
>>>
>>> Colin
>>
>> Thanks colin I already tried this but it give me the error:
>>
>> undefined method `company_name' for nil:NilClass
>
> Please quote the previous message when posting, this is a mailing list
> not a forum (though you may be accessing it via a forum like
> interface).
>
> If the statement
> category.supplier.company_name
> gives the error undefined method `company_name' for nil:NilClass then
> that means that category.supplier is nil, or to put it another way, it
> means that category does not have an associated supplier.  You
> probably need something like
> <td><%= category.supplier.company_name if category.supplier %></td>
> which will only attempt to determine the name if category.supplier is
> not nil
>
> Colin

Sory none of them worked, pls chk my app, 
https://www.dropbox.com/s/siioqa8q8xkdf46/tPOS.zip?dl=0

thanks.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/f7a208acc016c2f5399a82b98c4bccab%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to