From 8dd76a7a6ff1bb7105beabb8f834ca54ab1e5fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 13 Nov 2017 15:23:28 -0500 Subject: Use .tt extension to all the template files Make clear that the files are not to be run for interpreters. Fixes #23847. Fixes #30690. Closes #23878. --- activejob/lib/rails/generators/job/templates/application_job.rb | 9 --------- .../lib/rails/generators/job/templates/application_job.rb.tt | 9 +++++++++ activejob/lib/rails/generators/job/templates/job.rb | 9 --------- activejob/lib/rails/generators/job/templates/job.rb.tt | 9 +++++++++ 4 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 activejob/lib/rails/generators/job/templates/application_job.rb create mode 100644 activejob/lib/rails/generators/job/templates/application_job.rb.tt delete mode 100644 activejob/lib/rails/generators/job/templates/job.rb create mode 100644 activejob/lib/rails/generators/job/templates/job.rb.tt (limited to 'activejob/lib/rails/generators/job/templates') diff --git a/activejob/lib/rails/generators/job/templates/application_job.rb b/activejob/lib/rails/generators/job/templates/application_job.rb deleted file mode 100644 index f93745a31a..0000000000 --- a/activejob/lib/rails/generators/job/templates/application_job.rb +++ /dev/null @@ -1,9 +0,0 @@ -<% module_namespacing do -%> -class ApplicationJob < ActiveJob::Base - # Automatically retry jobs that encountered a deadlock - # retry_on ActiveRecord::Deadlocked - - # Most jobs are safe to ignore if the underlying records are no longer available - # discard_on ActiveJob::DeserializationError -end -<% end -%> diff --git a/activejob/lib/rails/generators/job/templates/application_job.rb.tt b/activejob/lib/rails/generators/job/templates/application_job.rb.tt new file mode 100644 index 0000000000..f93745a31a --- /dev/null +++ b/activejob/lib/rails/generators/job/templates/application_job.rb.tt @@ -0,0 +1,9 @@ +<% module_namespacing do -%> +class ApplicationJob < ActiveJob::Base + # Automatically retry jobs that encountered a deadlock + # retry_on ActiveRecord::Deadlocked + + # Most jobs are safe to ignore if the underlying records are no longer available + # discard_on ActiveJob::DeserializationError +end +<% end -%> diff --git a/activejob/lib/rails/generators/job/templates/job.rb b/activejob/lib/rails/generators/job/templates/job.rb deleted file mode 100644 index 4ad2914a45..0000000000 --- a/activejob/lib/rails/generators/job/templates/job.rb +++ /dev/null @@ -1,9 +0,0 @@ -<% module_namespacing do -%> -class <%= class_name %>Job < ApplicationJob - queue_as :<%= options[:queue] %> - - def perform(*args) - # Do something later - end -end -<% end -%> diff --git a/activejob/lib/rails/generators/job/templates/job.rb.tt b/activejob/lib/rails/generators/job/templates/job.rb.tt new file mode 100644 index 0000000000..4ad2914a45 --- /dev/null +++ b/activejob/lib/rails/generators/job/templates/job.rb.tt @@ -0,0 +1,9 @@ +<% module_namespacing do -%> +class <%= class_name %>Job < ApplicationJob + queue_as :<%= options[:queue] %> + + def perform(*args) + # Do something later + end +end +<% end -%> -- cgit v1.2.3