Skip to content

Commit

Permalink
Patch Ransack::Nodes::Condition#casted_array?
Browse files Browse the repository at this point in the history
Issue: activerecord-hackery/ransack#1467
PR: activerecord-hackery/ransack#1468

Hopefully the PR will be merged soon so we can remove this patch.
  • Loading branch information
spaghetticode authored and elia committed Dec 20, 2023
1 parent 337e604 commit bf7c5b0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions core/lib/solidus_core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,14 @@ def table_name
name
end
end


module RansackNodeConditionPatch
private

def casted_array?(predicate)
predicate.is_a?(Arel::Nodes::Casted) && predicate.value.is_a?(Array)
end

Ransack::Nodes::Condition.prepend(self)
end

0 comments on commit bf7c5b0

Please sign in to comment.