diff options
author | Hiro Asari <asari.ruby@gmail.com> | 2012-12-10 23:04:51 -0500 |
---|---|---|
committer | Hiro Asari <asari.ruby@gmail.com> | 2012-12-10 23:04:51 -0500 |
commit | c00e7aa919624e4f26a6bc0a924892a87dbd91c0 (patch) | |
tree | cd9aac40d3245d8846cebf755a1e9d5019a9b7a1 /actionpack/lib | |
parent | 603e7f7ea507feb3cfea53c42b23be2b32dc240b (diff) | |
download | rails-c00e7aa919624e4f26a6bc0a924892a87dbd91c0.tar.gz rails-c00e7aa919624e4f26a6bc0a924892a87dbd91c0.tar.bz2 rails-c00e7aa919624e4f26a6bc0a924892a87dbd91c0.zip |
Match the controller and path names defensively.
Use '\A' instead of '^', and make the alteration shorter.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/inspector.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/inspector.rb b/actionpack/lib/action_dispatch/routing/inspector.rb index d7412daec2..8d7461ecc3 100644 --- a/actionpack/lib/action_dispatch/routing/inspector.rb +++ b/actionpack/lib/action_dispatch/routing/inspector.rb @@ -51,7 +51,7 @@ module ActionDispatch end def internal? - controller =~ %r{^rails/info|^rails/welcome} || path =~ %r{^#{Rails.application.config.assets.prefix}} + controller =~ %r{\Arails/(info|welcome)} || path =~ %r{\A#{Rails.application.config.assets.prefix}} end def engine? |