مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-11-30 21:32:30 +00:00
style(rubocop): Lint/UnusedBlockArgument
هذا الالتزام موجود في:
@@ -85,7 +85,7 @@ class Domain < ApplicationRecord
|
||||
|
||||
def parent_domains
|
||||
parts = name.split(".")
|
||||
parts[0, parts.size - 1].each_with_index.map do |p, i|
|
||||
parts[0, parts.size - 1].each_with_index.map do |_, i|
|
||||
parts[i..-1].join(".")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -137,7 +137,7 @@ class OutgoingMessagePrototype
|
||||
end
|
||||
|
||||
if attachments.present?
|
||||
attachments.each_with_index do |attachment, index|
|
||||
attachments.each do |attachment|
|
||||
if attachment[:name].blank?
|
||||
@errors << "AttachmentMissingName" unless @errors.include?("AttachmentMissingName")
|
||||
elsif attachment[:data].blank?
|
||||
|
||||
@@ -117,7 +117,7 @@ class Route < ApplicationRecord
|
||||
if route.save
|
||||
seen << route.id
|
||||
else
|
||||
route.errors.each do |field, message|
|
||||
route.errors.each do |_, message|
|
||||
errors.add :base, message
|
||||
end
|
||||
raise ActiveRecord::RecordInvalid
|
||||
|
||||
@@ -157,7 +157,7 @@ class Server < ApplicationRecord
|
||||
time = Time.now.utc
|
||||
total_outgoing = 0.0
|
||||
total_bounces = 0.0
|
||||
message_db.statistics.get(:daily, [:outgoing, :bounces], time, 30).each do |date, stat|
|
||||
message_db.statistics.get(:daily, [:outgoing, :bounces], time, 30).each do |_, stat|
|
||||
total_outgoing += stat[:outgoing]
|
||||
total_bounces += stat[:bounces]
|
||||
end
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم