1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-12-01 05:43:04 +00:00

Fix removed ip_pool type errors (#62)

* Fix undefined method description

Sice `:description` was removed from the IP pools it should display the IP pool `:name` instead of the `:description`.

* Fix using the removed ip_pool type
هذا الالتزام موجود في:
Alex Bouma
2017-04-29 20:42:29 +02:00
ملتزم من قبل Adam Cooke
الأصل f779e45f45
التزام ddf2a859bf
2 ملفات معدلة مع 2 إضافات و2 حذوفات

عرض الملف

@@ -273,7 +273,7 @@ class Server < ApplicationRecord
end end
def validate_ip_pool_belongs_to_organization def validate_ip_pool_belongs_to_organization
if self.ip_pool && self.ip_pool_id_changed? && (self.ip_pool.type == 'Dedicated' && !self.organization.ip_pools.include?(self.ip_pool)) if self.ip_pool && self.ip_pool_id_changed? && !self.organization.ip_pools.include?(self.ip_pool)
errors.add :ip_pool_id, "must belong to the organization" errors.add :ip_pool_id, "must belong to the organization"
end end
end end

عرض الملف

@@ -25,7 +25,7 @@
.fieldSet__field .fieldSet__field
= f.label :ip_pool_id, :class => 'fieldSet__label' = f.label :ip_pool_id, :class => 'fieldSet__label'
.fieldSet__input .fieldSet__input
= f.collection_select :ip_pool_id, organization.ip_pools.includes(:ip_addresses).order("`default` desc, name asc"), :id, :description, {}, :class => 'input input--select' = f.collection_select :ip_pool_id, organization.ip_pools.includes(:ip_addresses).order("`default` desc, name asc"), :id, :name, {}, :class => 'input input--select'
%p.fieldSet__text %p.fieldSet__text
This is the set of IP addresses which outbound e-mails will be delivered from. This is the set of IP addresses which outbound e-mails will be delivered from.