Skip to content

Commit

Permalink
Use .tt extension to all the template files
Browse files Browse the repository at this point in the history
Make clear that the files are not to be run for interpreters.

Fixes #23847.
Fixes #30690.
Closes #23878.
  • Loading branch information
rafaelfranca committed Nov 13, 2017
1 parent 705cf47 commit 8dd76a7
Show file tree
Hide file tree
Showing 113 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
Place all the styles related to the matching controller here.
They will automatically be included in application.css.
*/
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class JobGenerator < Base # :nodoc:
check_class_collision suffix: "JobTest"

def create_test_file
template "unit_test.rb.erb", File.join("test/jobs", class_path, "#{file_name}_job_test.rb")
template "unit_test.rb", File.join("test/jobs", class_path, "#{file_name}_job_test.rb")
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions railties/test/generators/generators_test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ def self.included(base)
end

def copy_routes
routes = File.expand_path("../../lib/rails/generators/rails/app/templates/config/routes.rb", __dir__)
routes = File.expand_path("../../lib/rails/generators/rails/app/templates/config/routes.rb.tt", __dir__)
destination = File.join(destination_root, "config")
FileUtils.mkdir_p(destination)
FileUtils.cp routes, destination
FileUtils.cp routes, File.join(destination, "routes.rb")
end
end

0 comments on commit 8dd76a7

Please sign in to comment.