Class: Pageflow::Generators::ResqueGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_initializersObject



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

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