Class: Pageflow::Generators::ResqueGenerator Private

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/pageflow/resque/resque_generator.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

API:

  • private

Instance Method Summary collapse

Instance Method Details

#create_initializersObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/generators/pageflow/resque/resque_generator.rb', line 11

def create_initializers
  template 'resque.rb', 'config/initializers/resque.rb'
  template 'resque_enqueue_after_commit_patch.rb',
           'config/initializers/resque_enqueue_after_commit_patch.rb'
  template 'resque.rake', 'lib/tasks/resque.rake'

  inject_into_file 'config/application.rb', after: /config.load_defaults .*\n/ do
    <<-RUBY
    config.active_job.queue_adapter = :resque
    RUBY
  end
end