aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authorRobin Dupret <robin.dupret@gmail.com>2014-03-08 15:51:49 +0100
committerRobin Dupret <robin.dupret@gmail.com>2014-03-08 15:59:22 +0100
commit9c53b8b89f0b4aec5a2ec3611cefae8e7b6514a5 (patch)
treefaba48d0f7d7ff2209e178eb420fc50645584468 /railties/lib/rails
parentdc8bfc8ab62c3e3a776297226ef43027bc7d09c1 (diff)
downloadrails-9c53b8b89f0b4aec5a2ec3611cefae8e7b6514a5.tar.gz
rails-9c53b8b89f0b4aec5a2ec3611cefae8e7b6514a5.tar.bz2
rails-9c53b8b89f0b4aec5a2ec3611cefae8e7b6514a5.zip
Make the rails:template rake task load initializers
Templates could rely on irregular inflections or external libraries for instance so we should load the application's initializers when running the rails:template task. The introducing commit of this feature is f7f11361 ; the initializers have never been loaded invoking this task. Fixes #12133.
Diffstat (limited to 'railties/lib/rails')
-rw-r--r--railties/lib/rails/tasks/framework.rake2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake
index e669315934..3c8f8c6b87 100644
--- a/railties/lib/rails/tasks/framework.rake
+++ b/railties/lib/rails/tasks/framework.rake
@@ -3,7 +3,7 @@ namespace :rails do
task update: [ "update:configs", "update:bin" ]
desc "Applies the template supplied by LOCATION=(/path/to/template) or URL"
- task :template do
+ task template: :environment do
template = ENV["LOCATION"]
raise "No LOCATION value given. Please set LOCATION either as path to a file or a URL" if template.blank?
template = File.expand_path(template) if template !~ %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://}