Skip to content

Commit

Permalink
Update rails:template task to expand file paths [#2528 state:resolved]
Browse files Browse the repository at this point in the history
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information
stephencelis authored and lifo committed Apr 21, 2009
1 parent d7d93cd commit 7a99dc0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion railties/lib/tasks/framework.rake
Expand Up @@ -83,7 +83,9 @@ namespace :rails do
desc "Applies the template supplied by LOCATION=/path/to/template"
task :template do
require 'rails_generator/generators/applications/app/template_runner'
Rails::TemplateRunner.new(ENV["LOCATION"])
template = ENV["LOCATION"]
template = File.expand_path(template) if template !~ %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://}
Rails::TemplateRunner.new(template)
end

namespace :update do
Expand Down

0 comments on commit 7a99dc0

Please sign in to comment.