-
-
Notifications
You must be signed in to change notification settings - Fork 781
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
【Question】 If pass arguments "1" value to the scope method for ransackable_scopes, ArgumentError (wrong number of arguments (given 0, expected 1)): #1232
Comments
What's the full error trace? Only showing the top line of the error with no context makes this difficult to understand. |
Hi, Thanks for reply. I did attach full trace log for rails. |
Hi. Therefore, I did notice that "1" character did convert from "1" to "true" for sanitize scope method. Line 128 in 16ce911
ransack/lib/ransack/context.rb Line 47 in 16ce911
Debug Result
By this sanitize scope method, |
Is there any other solution, better than adding a default value to the scope eg. ? |
Solved in #924, def self.ransackable_scopes_skip_sanitize_args
[:scope_name]
end to the model. |
Hi, and when I replace Adding my repro app to help: versionsransack: 3.0.0 model
controller
test
|
Version
Source code
Model
app/model/user.rb
Controller
If not "1" arguments
debug
But If "1" arguments
Why If pass arguments "1" value to the scope method for ransackable_scopes, Argument Error?
The text was updated successfully, but these errors were encountered: