From a2c3b282577d1dc784898681763a400a0caad5c3 Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Tue, 18 Dec 2018 21:46:35 +0100 Subject: Remove actions argument from Mailbox generator. Generators only have the public `process` action, so there's nothing else to generate here. Skip the needless indirection. --- lib/generators/rails/mailbox_generator.rb | 2 -- lib/generators/rails/templates/mailbox.rb.tt | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'lib/generators') diff --git a/lib/generators/rails/mailbox_generator.rb b/lib/generators/rails/mailbox_generator.rb index 7b43173480..c2c403b8f6 100644 --- a/lib/generators/rails/mailbox_generator.rb +++ b/lib/generators/rails/mailbox_generator.rb @@ -5,8 +5,6 @@ module Rails class MailboxGenerator < NamedBase source_root File.expand_path("templates", __dir__) - argument :actions, type: :array, default: [:process], banner: "method method" - check_class_collision suffix: "Mailbox" def create_mailbox_file diff --git a/lib/generators/rails/templates/mailbox.rb.tt b/lib/generators/rails/templates/mailbox.rb.tt index 9788bd9bb4..56b138e2d9 100644 --- a/lib/generators/rails/templates/mailbox.rb.tt +++ b/lib/generators/rails/templates/mailbox.rb.tt @@ -1,8 +1,6 @@ # frozen_string_literal: true class <%= class_name %>Mailbox < ApplicationMailbox -<% actions.each do |action| -%> - def <%= action %> + def process end -<% end -%> end -- cgit v1.2.3