Search code examples
ruby-on-railsrubywice-grid

Capable of hosting filter related icons in Wice grid error


I am trying to find a resource in solving this issue. I am using the wice grid gem for my project and I encounter this error undefined method capable_of_hosting_filter_related_icons?' for nil:NilClass. Below is my view:

-grid(@vendors_grid) do |g|                  
  g.column name: 'ID', attribute: 'ID'do |vendor|                    
  vendor                          

[...]                                 

  link_to('Edit', vendor_index_path(vendor))

I converted the erb example from the readme file to haml. I followed the install instructions carefully to ensure I do not miss anything.


Solution

  • Make this small correction -grid(@vendors_grid).each do |g| and try again. It could be that you are not enumerating over an array, in which case you are not getting back the right object