diff options
author | Xavier Noria <fxn@hashref.com> | 2016-08-06 18:40:07 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-08-06 18:40:07 +0200 |
commit | 93c9534c9871d4adad4bc33b5edc355672b59c61 (patch) | |
tree | c9d8782bfb88207cd5857eb903b5f169fe593fea /activejob/lib/rails | |
parent | 4c208254573c3428d82bd8744860bd86e1c78acb (diff) | |
download | rails-93c9534c9871d4adad4bc33b5edc355672b59c61.tar.gz rails-93c9534c9871d4adad4bc33b5edc355672b59c61.tar.bz2 rails-93c9534c9871d4adad4bc33b5edc355672b59c61.zip |
applies new string literal convention in activejob/lib
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
Diffstat (limited to 'activejob/lib/rails')
-rw-r--r-- | activejob/lib/rails/generators/job/job_generator.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/activejob/lib/rails/generators/job/job_generator.rb b/activejob/lib/rails/generators/job/job_generator.rb index 6e43e4a269..6a509056c8 100644 --- a/activejob/lib/rails/generators/job/job_generator.rb +++ b/activejob/lib/rails/generators/job/job_generator.rb @@ -1,13 +1,13 @@ -require 'rails/generators/named_base' +require "rails/generators/named_base" module Rails # :nodoc: module Generators # :nodoc: class JobGenerator < Rails::Generators::NamedBase # :nodoc: - desc 'This generator creates an active job file at app/jobs' + desc "This generator creates an active job file at app/jobs" - class_option :queue, type: :string, default: 'default', desc: 'The queue name for the generated job' + class_option :queue, type: :string, default: "default", desc: "The queue name for the generated job" - check_class_collision suffix: 'Job' + check_class_collision suffix: "Job" hook_for :test_framework @@ -16,11 +16,11 @@ module Rails # :nodoc: end def create_job_file - template 'job.rb', File.join('app/jobs', class_path, "#{file_name}_job.rb") + template "job.rb", File.join("app/jobs", class_path, "#{file_name}_job.rb") in_root do if self.behavior == :invoke && !File.exist?(application_job_file_name) - template 'application_job.rb', application_job_file_name + template "application_job.rb", application_job_file_name end end end @@ -30,7 +30,7 @@ module Rails # :nodoc: @application_job_file_name ||= if mountable_engine? "app/jobs/#{namespaced_path}/application_job.rb" else - 'app/jobs/application_job.rb' + "app/jobs/application_job.rb" end end end |