aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2010-01-22 08:34:12 -0600
committerJoshua Peek <josh@joshpeek.com>2010-01-22 08:34:12 -0600
commitc52820ae1550c5e4d3b616c7354ea2c877c24e62 (patch)
tree39eb56d2b8fe7f724a6f094eb37393a3d7f9345e /railties
parent284fd2568de44ba913ff3accc439c5e6e22ca076 (diff)
downloadrails-c52820ae1550c5e4d3b616c7354ea2c877c24e62.tar.gz
rails-c52820ae1550c5e4d3b616c7354ea2c877c24e62.tar.bz2
rails-c52820ae1550c5e4d3b616c7354ea2c877c24e62.zip
Use expand_path to require environment in metal template
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/generators/rails/metal/templates/metal.rb2
1 files changed, 1 insertions, 1 deletions
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)