diff options
author | Akira Matsuda <ronnie@dio.jp> | 2017-01-05 17:20:57 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2017-01-05 19:58:52 +0900 |
commit | 5473e390d362755125d2f47b64ef0a135f2fe111 (patch) | |
tree | b9c199a3c78ad307ed034cf5618e2897dfa650c6 /activejob/lib/rails/generators/job | |
parent | 6197a38bca988f05087aa022e288922cf0331d6c (diff) | |
download | rails-5473e390d362755125d2f47b64ef0a135f2fe111.tar.gz rails-5473e390d362755125d2f47b64ef0a135f2fe111.tar.bz2 rails-5473e390d362755125d2f47b64ef0a135f2fe111.zip |
`self.` is not needed when calling its own instance method
Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
Diffstat (limited to 'activejob/lib/rails/generators/job')
-rw-r--r-- | activejob/lib/rails/generators/job/job_generator.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activejob/lib/rails/generators/job/job_generator.rb b/activejob/lib/rails/generators/job/job_generator.rb index 97c11a9ea6..50476a2e50 100644 --- a/activejob/lib/rails/generators/job/job_generator.rb +++ b/activejob/lib/rails/generators/job/job_generator.rb @@ -19,7 +19,7 @@ module Rails # :nodoc: 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) + if behavior == :invoke && !File.exist?(application_job_file_name) template "application_job.rb", application_job_file_name end end |