Skip to content

Commit bf7c5b0

Browse files
spaghetticodeelia
authored andcommitted
Patch Ransack::Nodes::Condition#casted_array?
Issue: activerecord-hackery/ransack#1467 PR: activerecord-hackery/ransack#1468 Hopefully the PR will be merged soon so we can remove this patch.
1 parent 337e604 commit bf7c5b0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

core/lib/solidus_core.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,14 @@ def table_name
77
name
88
end
99
end
10+
11+
12+
module RansackNodeConditionPatch
13+
private
14+
15+
def casted_array?(predicate)
16+
predicate.is_a?(Arel::Nodes::Casted) && predicate.value.is_a?(Array)
17+
end
18+
19+
Ransack::Nodes::Condition.prepend(self)
20+
end

0 commit comments

Comments
 (0)