Commit 40086791 by Ivan Lan

fix pasted with any if arg is empty array

parent 23a9a168
......@@ -9,6 +9,7 @@ module ActsAsPasting
# ary => [obj, obj]
scope :pasted_with_any, ->(ary, prefix: '') {
ary = parsed_condition_ary(ary)
return none unless ary.first
arel = Arel::Table.new(:acts_as_pasting_pastings, as: "acts_as_pasting_pastings_#{SecureRandom.hex(10)}")
source_arel = arel_table
join_condition = ary.group_by(&:first).map do |(klass, value)|
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment