Commit 00a0af6e authored by James Fargher's avatar James Fargher

Merge branch 'plan-limits-improvement' into 'master'

Clean Code: Plan limits improvements

See merge request gitlab-org/gitlab!31732
parents 4c872937 d66b1249
......@@ -11,7 +11,7 @@ class PlanLimits < ApplicationRecord
else
# object.count >= limit value is slower than checking
# if a record exists at the limit value - 1 position.
object.limit(1).offset(read_attribute(limit_name) - 1).exists?
object.offset(read_attribute(limit_name) - 1).exists?
end
end
......
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