aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib
diff options
context:
space:
mode:
authorYoshiyuki Hirano <yhirano@me.com>2018-04-22 12:09:04 +0900
committerYoshiyuki Hirano <yhirano@me.com>2018-04-22 12:09:04 +0900
commit8e2c91df4a8d4f336fe27ec98bd1dfd4934ac9fe (patch)
treec464d7129dbb4ee42296e10649976e9abf1af24e /activejob/lib
parent7452351815f0c49164c02368d12d28a83df5134d (diff)
downloadrails-8e2c91df4a8d4f336fe27ec98bd1dfd4934ac9fe.tar.gz
rails-8e2c91df4a8d4f336fe27ec98bd1dfd4934ac9fe.tar.bz2
rails-8e2c91df4a8d4f336fe27ec98bd1dfd4934ac9fe.zip
Fix duplicated suffix for JobGenerator
Diffstat (limited to 'activejob/lib')
-rw-r--r--activejob/lib/rails/generators/job/job_generator.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activejob/lib/rails/generators/job/job_generator.rb b/activejob/lib/rails/generators/job/job_generator.rb
index 69b4fe7d26..44444e7e04 100644
--- a/activejob/lib/rails/generators/job/job_generator.rb
+++ b/activejob/lib/rails/generators/job/job_generator.rb
@@ -28,6 +28,10 @@ module Rails # :nodoc:
end
private
+ def file_name
+ @_file_name ||= super.gsub(/_job/i, "")
+ end
+
def application_job_file_name
@application_job_file_name ||= if mountable_engine?
"app/jobs/#{namespaced_path}/application_job.rb"