mirror of https://github.com/docusealco/docuseal
				
				
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							17 lines
						
					
					
						
							533 B
						
					
					
				
			
		
		
	
	
							17 lines
						
					
					
						
							533 B
						
					
					
				| # frozen_string_literal: true
 | |
| 
 | |
| class SubmittersSendEmailController < ApplicationController
 | |
|   def create
 | |
|     submitter = Submitter.joins(:template)
 | |
|                          .where(template: { account_id: current_account.id })
 | |
|                          .find_by!(slug: params[:submitter_slug])
 | |
| 
 | |
|     SubmitterMailer.invitation_email(submitter).deliver_later!
 | |
| 
 | |
|     submitter.sent_at ||= Time.current
 | |
|     submitter.save!
 | |
| 
 | |
|     redirect_back(fallback_location: submission_path(submitter.submission), notice: 'Email has been sent')
 | |
|   end
 | |
| end
 |