mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
DEV: Prefer public_send
over send
.
This commit is contained in:
@ -107,8 +107,9 @@ module Email
|
||||
|
||||
styled = Email::Styles.new(html_override, @opts)
|
||||
styled.format_basic
|
||||
|
||||
if style = @opts[:style]
|
||||
styled.send("format_#{style}")
|
||||
styled.public_send("format_#{style}")
|
||||
end
|
||||
|
||||
Mail::Part.new do
|
||||
|
@ -345,7 +345,7 @@ module Email
|
||||
# use the first html extracter that matches
|
||||
if html_extracter = HTML_EXTRACTERS.select { |_, r| html[r] }.min_by { |_, r| html =~ r }
|
||||
doc = Nokogiri::HTML.fragment(html)
|
||||
self.send(:"extract_from_#{html_extracter[0]}", doc)
|
||||
self.public_send(:"extract_from_#{html_extracter[0]}", doc)
|
||||
else
|
||||
markdown = HtmlToMarkdown.new(html, keep_img_tags: true, keep_cid_imgs: true).to_markdown
|
||||
markdown = trim_discourse_markers(markdown)
|
||||
@ -1176,7 +1176,7 @@ module Email
|
||||
end
|
||||
|
||||
def send_subscription_mail(action, user)
|
||||
message = SubscriptionMailer.send(action, user)
|
||||
message = SubscriptionMailer.public_send(action, user)
|
||||
Email::Sender.new(message, :subscription).send
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user