refactors conflictable behaviour

This commit is contained in:
rgarcia
2015-09-28 13:38:48 +02:00
parent 8e42055ece
commit 6d5d60c0df
3 changed files with 11 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
class Proposal < ActiveRecord::Base
include Flaggable
include Taggable
include Conflictable
apply_simple_captcha
acts_as_votable
@@ -42,11 +42,6 @@ class Proposal < ActiveRecord::Base
cached_votes_up
end
def conflictive?
return false unless flags_count > 0 && cached_votes_up > 0
cached_votes_up/flags_count.to_f < 5
end
def description
super.try :html_safe
end