From 9c53b8b89f0b4aec5a2ec3611cefae8e7b6514a5 Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Sat, 8 Mar 2014 15:51:49 +0100 Subject: 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. --- railties/lib/rails/tasks/framework.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails') 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+\-\.]*://} -- cgit v1.2.3