Class: ActionMailbox::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ActionMailbox::Generators::InstallGenerator
- Defined in:
- lib/generators/action_mailbox/install/install_generator.rb
Instance Method Summary collapse
- #add_action_mailbox_production_environment_config ⇒ Object
- #create_action_mailbox_files ⇒ Object
- #create_migrations ⇒ Object
Instance Method Details
#add_action_mailbox_production_environment_config ⇒ Object
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_files ⇒ Object
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_migrations ⇒ Object
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 |