Permalink
Browse files

Match the controller and path names defensively.

Use '\A' instead of '^', and make the alteration shorter.
  • Loading branch information...
1 parent 603e7f7 commit c00e7aa919624e4f26a6bc0a924892a87dbd91c0 @BanzaiMan BanzaiMan committed Dec 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/routing/inspector.rb
@@ -51,7 +51,7 @@ def action
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?

1 comment on commit c00e7aa

Owner

tenderlove commented on c00e7aa Dec 11, 2012

👍

Please sign in to comment.