leikind / wice_grid

A Rails grid plugin to create grids with sorting, pagination, and (automatically generated) filters
MIT License
535 stars 215 forks source link

undefined method `page' for Class #336

Closed CR4567 closed 7 years ago

CR4567 commented 7 years ago

Hi, I tried upgrading from version 3.4.10 to 3.6.0.pre4, but now getting following error:

undefined method page for #<Class:0x007faea19a7340>

I'm using Rails 4.2.0 and ruby 2.3.1. I already updated the wice_grid config file. Can't find and further mistake... cleared most of my code and used a clean Table with just one column but getting this error all the time. Also with different models. Using it like: Controller:

@events = initialize_grid(Event,
                                  :order => 'id',
                                  :order_direction => 'desc')

View:

 <%=
                  grid(@events) do |g|

                    g.column name: 'ID', attribute: 'id' do |event|
                      event.id
                    end

                    g.column name: 'Eventtyp', attribute: 'translation_code', assoc: :event_type do |event|
                      I18n.t event.event_type.translation_code
                    end
end
-%>

Any suggestions?

CR4567 commented 7 years ago

Ok finally found the stupid error... I had an old initializer for Kaminari which configure some per_page settings... after deleting these everything works again.