A platform for community discussion. Free, open, simple.
DEV: Stop polluting all Ruby classes
Loïc Guitaut74387e83b605
diff --git a/app/models/reviewable_score.rb b/app/models/reviewable_score.rbindex 208ea5b8fc5..34080a944d9 100644--- a/app/models/reviewable_score.rb+++ b/app/models/reviewable_score.rb@@ -49,7 +49,7 @@ class ReviewableScore < ActiveRecord::Base# Generate `pending?`, `rejected?`, etc helper methodsstatuses.each do |name, id|define_method("#{name}?") { status == id }- self.class.define_method(name) { where(status: id) }+ singleton_class.define_method(name) { where(status: id) }enddef score_type