Class: ActionMailbox::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#add_action_mailbox_production_environment_configObject



15
16
17
18
19
20
21
# File '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 '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 'lib/generators/action_mailbox/install/install_generator.rb', line 23

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