app/models/post.rb
def commit_flag
    return if metatag_flagged.nil?
    return unless Thread.current["danbooru-user"].is_mod_or_higher?
    return if status != "active"

    self.flag!(metatag_flagged, Thread.current["danbooru-user"].id)
  end
# If the flag_post metatag was used and the current user has access, flag the post.
If the flag_post metatag was used and the current user has access, flag the post.
If the flag_post metatag was used and the current user has access flag the post .
def commit_flag
    return if metatag_flagged.nil?
    return unless Thread.current["danbooru-user"].is_mod_or_higher?
    return if status != "active"
    self.flag!(metatag_flagged, Thread.current["danbooru-user"].id)
  end
def commit_flag return if metatag_flagged . nil? return unless Thread . current [ "danbooru-user" ] . is_mod_or_higher? return if status != "active" self . flag! ( metatag_flagged , Thread . current [ "danbooru-user" ] . id ) end
If the flag_post metatag was used and the current user has access, flag the post.
If the flag_post metatag was used and the current user has access flag the post .