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

undefined method limit_by #23

Closed
jbwl opened this issue Nov 3, 2023 · 0 comments
Closed

undefined method limit_by #23

jbwl opened this issue Nov 3, 2023 · 0 comments

Comments

@jbwl
Copy link

jbwl commented Nov 3, 2023

I am trying to apply a limit_by to my cube. I'm having a hard time figuring out the arguments to pass.
My dimension is called product_id, and I want to limit it to 10 results:

I tried:

cube = cube.limit_by(['product_id'],[10])
and
cube = cube.limit_by(['product_id',10])
Both fail with:
undefined method limit_by for #<Arel::SelectManager>

Looking at the source, I also tried
cube = cube.limit_by([{ each: ['productid'],limit: [10]}])
Which also fails with
undefined method limit_by for #<Arel::SelectManager>

Could you please give an example how to use the limit_by option?

@jbwl jbwl closed this as completed Oct 15, 2024
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