Closed greenfork closed 3 years ago
Can you show full backtrace for the issue?
This is full backtrace unfortunately. I think the reason is double splat change https://github.com/bogdan/datagrid/commit/5a2ff92453758745f2793cbee34326c7eed11fda#diff-e862b050fb30334bd970ac6714786a6120a21c965b4a95f3f57b3f4792adafaeL124-R125
Reproducible example
require "datagrid"
class UsersGrid
include Datagrid
scope do
[1,2,3]
end
column_names_filter(header: "Header")
column(:name) { |val| val }
end
grfork@pisec /tmp> ruby datagrid.rb
/home/grfork/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/datagrid-1.6.2/lib/datagrid/filters.rb:97:in `filter': wrong number of arguments (given 3, expected 1..2) (ArgumentError)
from /home/grfork/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/datagrid-1.6.2/lib/datagrid/column_names_attribute.rb:30:in `column_names_filter'
from datagrid.rb:11:in `<class:UsersGrid>'
from datagrid.rb:3:in `<main>'
Try version 1.6.3.
Yep, all works fine, thank you.
with this line