You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing this issue starting from Ransack 3.2 which removes the support for Rails 6 and some ancillary code.
The issue is happening here and is caused by the fact that in my context the right predicate for a Arel::Nodes::In predicate is a Arel::SelectManager rather than a Arel::Nodes::Casted, so we can't call #value on it:
The fix should be pretty simple: just check for the class before calling #value on the predicate.
For more context, the previous implementation didn't raise because there was an extra support method that hid the fact that the predicate may not respond to either #val or #value:
I'm experiencing this issue starting from Ransack 3.2 which removes the support for Rails 6 and some ancillary code.
The issue is happening here and is caused by the fact that in my context the right predicate for a
Arel::Nodes::In
predicate is aArel::SelectManager
rather than aArel::Nodes::Casted
, so we can't call#value
on it:The fix should be pretty simple: just check for the class before calling
#value
on thepredicate
.For more context, the previous implementation didn't raise because there was an extra support method that hid the fact that the predicate may not respond to either #val or #value:
So, in my case this was equivalent to
nil.is_a?(Array) && predicate.is_a?(Arel::Nodes::Casted)
The text was updated successfully, but these errors were encountered: