|
|
|
|
|
by revskill
1308 days ago
|
|
def call(name:, email_address:)
email_client.deliver(
to: email_address,
subject: "Welcome!",
text_body: welcome_email.render_text(name: name),
html_body: welcome_email.render_html(name: name)
) SlackNotifier.notify("Welcome email sent to #{email_address}")
end
This code is bad.If you want Hanami to be an IoC framework, why still allow direct SlackNotifier to be injected to the action layer here ? I guess, lib/ folder should be loaded into Deps instead (Deps["slack_notifier"] ? |
|