refactors conflictable behaviour
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user