flags: don't set is_flagged twice.

PostFlag#update_post already sets is_flagged when the flag is created.
No need to set it again.
This commit is contained in:
evazion
2017-05-04 15:05:02 -05:00
parent 9f64857719
commit 8638b7527b

View File

@@ -301,8 +301,6 @@ class Post < ActiveRecord::Base
if flag.errors.any?
raise PostFlag::Error.new(flag.errors.full_messages.join("; "))
end
update_column(:is_flagged, true) unless is_flagged?
end
def appeal!(reason)