Skip to content
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

Comments pagination breaks with custom Kaminari page method. #5441

Closed
SirRawlins opened this issue Jul 27, 2018 · 0 comments
Closed

Comments pagination breaks with custom Kaminari page method. #5441

SirRawlins opened this issue Jul 27, 2018 · 0 comments

Comments

@SirRawlins
Copy link

Expected behaviour

The paginated comments feature introduced in #5088 should render paginated comments even when using a custom Kaminari 'page_method_name', which may be used to prevent conflicts with will_paginate, as described in the documentation.

Actual behavior

Trying to render comments since #5088 raises an exception "undefined method `page' for #<ActiveRecord::Relation []>"

How to reproduce

Configure a custom Kaminari page method in config/initializers/kaminari.rb like so:

Kaminari.configure do |config|
    config.page_method_name = :per_page_kaminari
end

Try to render comments with active_admin_comments and watch it raise the exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants