Class: ActionMailbox::Generators::InstallGenerator

Inherits:
Rails::Generators::Base show all
Defined in:
actionmailbox/lib/generators/action_mailbox/install/install_generator.rb

Instance Method Summary collapse

Methods inherited from Rails::Generators::Base

base_root, class_option, default_source_root, desc, exit_on_failure?, hide!, hook_for, inherited, namespace, remove_hook_for, source_root

Methods included from Rails::Generators::Actions

#add_source, #environment, #gem, #gem_group, #generate, #git, #github, #initialize, #initializer, #lib, #rails_command, #rake, #rakefile, #readme, #route, #vendor

Instance Method Details

#add_action_mailbox_production_environment_configObject


15
16
17
18
19
20
21
# File 'actionmailbox/lib/generators/action_mailbox/install/install_generator.rb', line 15

def add_action_mailbox_production_environment_config
  environment <<~end_of_config, env: "production"
    # Prepare the ingress controller used to receive mail
    # config.action_mailbox.ingress = :relay

  end_of_config
end

#create_action_mailbox_filesObject


10
11
12
13
# File 'actionmailbox/lib/generators/action_mailbox/install/install_generator.rb', line 10

def create_action_mailbox_files
  say "Copying application_mailbox.rb to app/mailboxes", :green
  template "application_mailbox.rb", "app/mailboxes/application_mailbox.rb"
end

#create_migrationsObject


23
24
25
# File 'actionmailbox/lib/generators/action_mailbox/install/install_generator.rb', line 23

def create_migrations
  rails_command "railties:install:migrations FROM=active_storage,action_mailbox"
end