From 284fd2568de44ba913ff3accc439c5e6e22ca076 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 22 Jan 2010 08:31:41 -0600 Subject: Include cascade header in metal template --- railties/lib/generators/rails/metal/templates/metal.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/generators/rails/metal/templates/metal.rb') diff --git a/railties/lib/generators/rails/metal/templates/metal.rb b/railties/lib/generators/rails/metal/templates/metal.rb index e94982b69a..fad98f4d1d 100644 --- a/railties/lib/generators/rails/metal/templates/metal.rb +++ b/railties/lib/generators/rails/metal/templates/metal.rb @@ -6,7 +6,7 @@ class <%= class_name %> if env["PATH_INFO"] =~ /^\/<%= file_name %>/ [200, {"Content-Type" => "text/html"}, ["Hello, World!"]] else - [404, {"Content-Type" => "text/html"}, ["Not Found"]] + [404, {"Content-Type" => "text/html", "X-Cascade" => "pass"}, ["Not Found"]] end end end -- cgit v1.2.3 From c52820ae1550c5e4d3b616c7354ea2c877c24e62 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 22 Jan 2010 08:34:12 -0600 Subject: Use expand_path to require environment in metal template --- railties/lib/generators/rails/metal/templates/metal.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/generators/rails/metal/templates/metal.rb') diff --git a/railties/lib/generators/rails/metal/templates/metal.rb b/railties/lib/generators/rails/metal/templates/metal.rb index fad98f4d1d..2f5d4e7593 100644 --- a/railties/lib/generators/rails/metal/templates/metal.rb +++ b/railties/lib/generators/rails/metal/templates/metal.rb @@ -1,5 +1,5 @@ # Allow the metal piece to run in isolation -require(File.dirname(__FILE__) + "/../../config/environment") unless defined?(Rails) +require File.expand_path('../../../config/environment', __FILE__) class <%= class_name %> def self.call(env) -- cgit v1.2.3