Created
April 11, 2025 23:07
-
-
Save AviFS/7099222f26fa818e97ec4edc43ca2daf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'roda' | |
class Mailer < Roda | |
plugin :mailer | |
route do |r| | |
r.mail 'current_welcome' do |user_id, mail_from| | |
<<~BODY | |
user_id: #{user_id.inspect} | |
mail_from: #{mail_from.inspect} | |
BODY | |
end | |
r.mail 'proposed_welcome', Integer do |user_id, mail_from| | |
<<~BODY | |
user_id: #{user_id.inspect} | |
mail_from: #{mail_from.inspect} | |
BODY | |
end | |
end | |
end | |
puts "current" | |
puts Mailer.mail('/current_welcome/2', '[email protected]').body | |
puts | |
puts "proposed" | |
puts Mailer.mail('/proposed_welcome/2', '[email protected]').body |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output: