diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-05-15 14:17:28 +0000 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-05-23 00:53:51 +0300 |
commit | 40bdbce191ad90dfea43dad51fac5c4726b89392 (patch) | |
tree | a6c6d8369874775cdc6cf1d4b90684490c0198bc /actionpack/lib | |
parent | d414881a342d849d65810a037c0b1baff8538e41 (diff) | |
download | rails-40bdbce191ad90dfea43dad51fac5c4726b89392.tar.gz rails-40bdbce191ad90dfea43dad51fac5c4726b89392.tar.bz2 rails-40bdbce191ad90dfea43dad51fac5c4726b89392.zip |
Define path with __dir__
".. with __dir__ we can restore order in the Universe." - by @fxn
Related to 5b8738c2df003a96f0e490c43559747618d10f5f
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/gtg/transition_table.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/debug_exceptions.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb b/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb index e1ac2c873e..45aff287b1 100644 --- a/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb +++ b/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb @@ -82,7 +82,7 @@ module ActionDispatch end def visualizer(paths, title = "FSM") - viz_dir = File.join File.dirname(__FILE__), "..", "visualizer" + viz_dir = File.join __dir__, "..", "visualizer" fsm_js = File.read File.join(viz_dir, "fsm.js") fsm_css = File.read File.join(viz_dir, "fsm.css") erb = File.read File.join(viz_dir, "index.html.erb") diff --git a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb index 1c720c5a8e..336a775880 100644 --- a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb @@ -10,7 +10,7 @@ module ActionDispatch # This middleware is responsible for logging exceptions and # showing a debugging page in case the request is local. class DebugExceptions - RESCUES_TEMPLATE_PATH = File.expand_path("../templates", __FILE__) + RESCUES_TEMPLATE_PATH = File.expand_path("templates", __dir__) class DebugView < ActionView::Base def debug_params(params) |