leikind / wice_grid

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

Wrong number of arguments error #269

Closed Nickk4 closed 8 years ago

Nickk4 commented 8 years ago

Using the code below, when trying to render the show page I get the error: wrong number of arguments (1 for 2). Does anyone understand where this error is coming from?

def show
  @couponcode = Couponcode.find(params[:id])
  @transactions_grid = initialize_grid(Transaction,
    include:         [:organization],
    conditions:      { couponcode_id: @couponcode.id },
    per_page:        25,
    order:           'transactions.apply_date',
    order_direction: 'desc')
end

In my view:

<%= grid(@transactions_grid, show_filters: :when_filtered, html: {class: 'my-grid'}) do |g|
...etc.
Nickk4 commented 8 years ago

Sorry, just found that this is a bug that was solved in the latest release: https://github.com/leikind/wice_grid/issues/204