From bcf9410ec361078193816f10444bdf3379786d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Emin=20=C4=B0NA=C3=87?= Date: Sun, 14 Jun 2015 18:10:32 +0300 Subject: Wrong documentation about Rails autoload on active_jobs_basics doc [ci skip] By default Rails automaticaly loads all files under the app directory --- guides/source/active_job_basics.md | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/guides/source/active_job_basics.md b/guides/source/active_job_basics.md index cc7a944f49..22f3c0146a 100644 --- a/guides/source/active_job_basics.md +++ b/guides/source/active_job_basics.md @@ -76,25 +76,6 @@ class GuestsCleanupJob < ActiveJob::Base end ``` -### Make the Job Available for Use - -Rails does not autoload the `app/jobs` directory by default. To make your job -accessible in the rest of your application you need to add the directory to the -auto-load paths: - -```ruby -# config/application.rb -module YourApp - class Application < Rails::Application - # Let Rails autoload your job classes for use in your code - config.autoload_paths << Rails.root.join('app/jobs') - end -end -``` - -Now you can make use of the job anywhere in your code (e.g. in your controllers -or models). - ### Enqueue the Job Enqueue a job like so: -- cgit v1.2.3