class ActionMailer::Preview

def preview_name

Returns the underscored name of the mailer preview without the suffix.
def preview_name
  name.delete_suffix("Preview").underscore
end