clean up tags_count_out_of_limit

This commit is contained in:
David Gil
2015-08-12 17:34:04 +02:00
parent 9a1bdb7aca
commit 1227ce7c08

View File

@@ -47,12 +47,10 @@ class Debate < ActiveRecord::Base
end
def tags_count_out_of_limit(limit = nil)
if limit
return 0 unless limit
count = tags.count - limit
count < 0 ? 0 : count
else
0
end
end
protected