File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -89,14 +89,14 @@ def arguments_match?(job)
89
89
end
90
90
91
91
def process_arguments ( job , given_mail_args )
92
- if job [ :job ] == ActionMailer ::MailDeliveryJob
93
- if given_mail_args . first . is_a? ( Hash ) && job [ :args ] [ 3 ] [ 'params' ] . present?
94
- [ hash_including ( params : given_mail_args [ 0 ] , args : given_mail_args . drop ( 1 ) ) ]
95
- else
96
- [ hash_including ( args : given_mail_args ) ]
97
- end
92
+ # Old matcher behavior working with all builtin classes but ActionMailer::MailDeliveryJob
93
+ return given_mail_args unless defined? ( ActionMailer :: MailDeliveryJob ) && job [ :job ] <= ActionMailer :: MailDeliveryJob
94
+
95
+ # If matching args starts with a hash and job instance has params match with them
96
+ if given_mail_args . first . is_a? ( Hash ) && job [ :args ] [ 3 ] [ 'params' ] . present?
97
+ [ hash_including ( params : given_mail_args [ 0 ] , args : given_mail_args . drop ( 1 ) ) ]
98
98
else
99
- given_mail_args
99
+ [ hash_including ( args : given_mail_args ) ]
100
100
end
101
101
end
102
102
You can’t perform that action at this time.
0 commit comments