File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
activerecord/lib/active_record/relation Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -1606,8 +1606,6 @@ def sanitize_order_arguments(order_args)
1606
1606
order_args . map! do |arg |
1607
1607
klass . sanitize_sql_for_order ( arg )
1608
1608
end
1609
- order_args . flatten!
1610
- order_args . compact_blank!
1611
1609
end
1612
1610
1613
1611
def column_references ( order_args )
@@ -1676,9 +1674,9 @@ def resolve_arel_attributes(attrs)
1676
1674
def check_if_method_has_arguments! ( method_name , args , message = nil )
1677
1675
if args . blank?
1678
1676
raise ArgumentError , message || "The method .#{ method_name } () must contain arguments."
1679
- elsif block_given?
1680
- yield args
1681
1677
else
1678
+ yield args if block_given?
1679
+
1682
1680
args . flatten!
1683
1681
args . compact_blank!
1684
1682
end
You can’t perform that action at this time.
0 commit comments