noticed icon indicating copy to clipboard operation
noticed copied to clipboard

Demodulize class name on mailer method lookup

Open StanisLove opened this issue 3 years ago • 1 comments

Hi, mailer method is defined as an underscored class name if the method option wasn't provided

https://github.com/excid3/noticed/blob/df561f348cc33283e4cc62f711f7d9a47b811a12/lib/noticed/delivery_methods/email.rb#L36-L43

But if I put my notification class to a module the result string will contain the name of that module as a prefix.

Employees::NotifyAboutNewOrder.name.underscore #=> "employees/notify_about_new_order"

I think it is appropriate to pre-demodulize a class name here.

StanisLove avatar Feb 22 '22 06:02 StanisLove

Makes sense to me. Do you want to submit a PR for that?

excid3 avatar Feb 22 '22 14:02 excid3

@excid3 hi! What you think about @StanisLove PR?

aka-nez avatar Sep 17 '23 17:09 aka-nez