File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,14 @@ def base_mailer_args
106106 end
107107
108108 def yield_mail_args ( block )
109- proc { |*job_args | block . call ( *( job_args - base_mailer_args ) ) }
109+ proc do |*job_args |
110+ mailer_args = job_args - base_mailer_args
111+ if mailer_args . first . is_a? ( Hash )
112+ block . call ( *mailer_args . first [ :args ] )
113+ else
114+ block . call ( *mailer_args )
115+ end
116+ end
110117 end
111118
112119 def check_active_job_adapter
@@ -133,7 +140,8 @@ def unmatching_mail_jobs_message
133140
134141 def mail_job_message ( job )
135142 mailer_method = job [ :args ] [ 0 ..1 ] . join ( '.' )
136- mailer_args = job [ :args ] [ 3 ..-1 ]
143+ mailer_args = deserialize_arguments ( job ) [ 3 ..-1 ]
144+ mailer_args = mailer_args . first [ :args ] if unified_mail? ( job )
137145 msg_parts = [ ]
138146 msg_parts << "with #{ mailer_args } " if mailer_args . any?
139147 msg_parts << "on queue #{ job [ :queue ] } " if job [ :queue ] && job [ :queue ] != 'mailers'
You can’t perform that action at this time.
0 commit comments