diff options
author | José Valim <jose.valim@gmail.com> | 2010-02-08 16:05:22 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-02-08 16:05:22 +0100 |
commit | 7f7dfd2babf0de37f64a1caf5c0f9e65a91112d1 (patch) | |
tree | 0e4ceb145bc215051bc845d5522cdca1dcf3c64d /railties/lib/rails/engine.rb | |
parent | 17b451898c09f560cef105ea120d8e767256555a (diff) | |
download | rails-7f7dfd2babf0de37f64a1caf5c0f9e65a91112d1.tar.gz rails-7f7dfd2babf0de37f64a1caf5c0f9e65a91112d1.tar.bz2 rails-7f7dfd2babf0de37f64a1caf5c0f9e65a91112d1.zip |
Take into account gem versions (so script/rails server can work outside the application) and use Rails::Application.root instead of ROOT_PATH.
Diffstat (limited to 'railties/lib/rails/engine.rb')
-rw-r--r-- | railties/lib/rails/engine.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 5983a9ee6b..53e54d7400 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -16,7 +16,7 @@ module Rails unless abstract_railtie?(base) base.called_from = begin call_stack = caller.map { |p| p.split(':').first } - File.dirname(call_stack.detect { |p| p !~ %r[railties/lib/rails|rack/lib/rack] }) + File.dirname(call_stack.detect { |p| p !~ %r[railties[\w\-]*/lib/rails|rack[\w\-]*/lib/rack] }) end end |