lib/rails/generators/mailer/mailer_generator.rb in actionmailer-5.1.7 vs lib/rails/generators/mailer/mailer_generator.rb in actionmailer-5.2.0.beta1
- old
+ new
@@ -1,8 +1,10 @@
+# frozen_string_literal: true
+
module Rails
module Generators
class MailerGenerator < NamedBase
- source_root File.expand_path("../templates", __FILE__)
+ source_root File.expand_path("templates", __dir__)
argument :actions, type: :array, default: [], banner: "method method"
check_class_collision suffix: "Mailer"