Created
April 6, 2020 18:29
-
-
Save ysv/42db6bd4f7723795e908ce8ae3494789 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
# To find unused email templates run next script in the rails console: | |
`ls app/views/application_mailer`.split(".html.erb\n") - ApplicationMailer.new.local_methods.map(&:to_s).filter {|mn| !mn.include?("_url") } | |
# To find missing email template for action: | |
ApplicationMailer.new.local_methods.map(&:to_s).filter {|mn| !mn.include?("_url") } - `ls app/views/application_mailer`.split(".html.erb\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment