app/models/jobshop/mailman.rb in jobshop-0.0.167 vs app/models/jobshop/mailman.rb in jobshop-0.0.179
- old
+ new
@@ -1,15 +1,13 @@
-# frozen_string_literals: true
+# frozen_string_literal: true
# +Jobshop::Mailman+
#
# A Mailman is responsible for handling incoming email and dispatching it to its
# approrpriate handler. If no handler is found, the email is rejected.
module Jobshop
class Mailman < ApplicationRecord
- self.primary_keys = %i[ organization_id address ]
-
- belongs_to :organization, inverse_of: :mailmen
+ belongs_to :organization, -> { readonly }, inverse_of: :mailmen
validates :address, presence: true
class << self
def handler_for(message)