I am building an application, that upon creating a customer record it will email the customer a welcome email. The message of that email is generated from a partial that merges in various data elements. I want to take the output of that partial and save it into the database so it can be viewed/recalled later.
I tried using the following in my controller.
@description = render "new_account_we"
Which I tried after reading https://guides.rubyonrails.org/layouts_and_rendering.html.
It gave me errors relating to two renders being in the controller as I have the typical respond to in my controller. Which I understand. So I can not render the partial in the controller and I do not want to show it actually on screen so I am stumped as to how to do this.
Can you give me some advice as to the best way to achieve this.