DEV: Rename with_secure_uploads? to should_secure_uploads? on Post (#26549)

This method name is a bit confusing; with_secure_uploads implies
it may return a block or something with the uploads of the post,
and has_secure_uploads implies that it's checking whether the post
is linked to any secure uploads.

should_secure_uploads? communicates the true intent of this method --
which is to say whether uploads attached to this post should be
secure or not.
This commit is contained in:
Martin Brennan
2024-04-09 13:23:11 +10:00
committed by GitHub
parent 84b4e4bddf
commit 0d0dbd391a
8 changed files with 29 additions and 29 deletions

View File

@ -8,7 +8,7 @@ module Chat
def initialize(chat_message, opts = {})
@model = chat_message
@previous_cooked = (chat_message.cooked || "").dup
@with_secure_uploads = false
@should_secure_uploads = false
@size_cache = {}
@opts = opts