aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-11-26 11:49:21 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-11-26 11:49:21 -0200
commit1a35f907a975f352bd1a90bfc116415249c49393 (patch)
tree340c939f49d09ccaffcb5b524e315cc30cb33079
parentee5473425e1646a902f5e312094d68ae787492a5 (diff)
parentf2b17231bacbbc437f64b51b386b3eea06c65c84 (diff)
downloadrails-1a35f907a975f352bd1a90bfc116415249c49393.tar.gz
rails-1a35f907a975f352bd1a90bfc116415249c49393.tar.bz2
rails-1a35f907a975f352bd1a90bfc116415249c49393.zip
Merge pull request #17782 from cheba/engine-root-master
Use absolute_path of caller_locations to infer engine root
-rw-r--r--railties/lib/rails/engine.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb
index 023ea98145..4b7da32208 100644
--- a/railties/lib/rails/engine.rb
+++ b/railties/lib/rails/engine.rb
@@ -351,7 +351,7 @@ module Rails
base.called_from = begin
call_stack = if Kernel.respond_to?(:caller_locations)
- caller_locations.map(&:path)
+ caller_locations.map(&:absolute_path)
else
# Remove the line number from backtraces making sure we don't leave anything behind
caller.map { |p| p.sub(/:\d+.*/, '') }