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

Inject other methods #22

Open
akimd opened this issue Dec 2, 2020 · 0 comments
Open

Inject other methods #22

akimd opened this issue Dec 2, 2020 · 0 comments

Comments

@akimd
Copy link

akimd commented Dec 2, 2020

Hi,
I have this model class in Rails that features a to_xlsx class method. I expected it to work as follows:

Book.paginate(page: 1, per_page: 10).to_xlsx

Unfortunately this does not work:

undefined method `to_xlsx' for #<WillPaginate::Collection:0x0000562a2aded870>

What is the recommended way to inject these routines?

Cheers!

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

1 participant