Skip to content

Commit

Permalink
Merge pull request #578 from NickLaMuro/fix_dangerous_query_method_fo…
Browse files Browse the repository at this point in the history
…r_rails_5_2

[CloudTenant] Fix "Dangerous query method"
  • Loading branch information
agrare authored Apr 6, 2020
2 parents af6c021 + beb3815 commit b70eabd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def default_security_group
# then return the security group with the most VMs in it.
security_groups.left_joins(:network_port_security_groups)
.group(:id)
.order('COUNT(network_ports_security_groups.security_group_id) DESC NULLS LAST')
.order(Arel.sql('COUNT(network_ports_security_groups.security_group_id) DESC NULLS LAST'))
.first
end

Expand Down

0 comments on commit b70eabd

Please sign in to comment.