zben/magento-rails — Issue #1: NoMethodError in Products#index
Author: rdsoze
Created: 2012-03-02 12:05:02+00:00
State: open

Am getting this error obviously because there's no products currently. I have connected this app to my magento database. So is it configured to pick out the products from there .

The error is as follows

Showing /home/raison/projects/magento-rails/app/cells/nav/topnav.html.haml where line #8 raised:

undefined method `name' for nil:NilClass
%ul.nav
-@categories.each do |cat|
%li{:class=>"#{@category==cat ? 'active' : ''}"}
=link_to cat.name,category_path(cat.id)