-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use Sequel pagination #311
Comments
The workaround that I came up with: # all_sites_grid.rb
class AllSitesGrid < BaseGrid
scope do
[]
end
end
# sites_controller.rb
grid = AllSitesGrid.new do
Site.dataset.paginate(1, 25).to_a
end |
Can you open the console and run Anyway, your grid imitation code looks incorrect. It should be:
|
It works in the console:
Not sure what you mean by grid imitation, but this is the error with your suggestion:
|
Try the following: # all_sites_grid.rb
class AllSitesGrid < BaseGrid
scope do
Site.dataset
end
end
# sites_controller.rb
grid = AllSitesGrid.new do |s|
s.paginate(1, 25)
end |
The same error even on
|
Try the following in console:
What is the result? |
|
Try the following too:
Also, let me know, which specific line is showing up in the backtrace with the error. |
Sorry, but can't you try it? It should be easy to reproduce. |
I did. It is not reproducing.
|
The test fails though. Also, doing |
I have no idea how limit appears in your code. You need to provide a full controller action, view, grid and model source code. |
See #312. |
Thanks! |
Sequel has a built-in extension for pagination that doesn't seem to work with Datagrid.
The text was updated successfully, but these errors were encountered: