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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user