Skip to content

Commit

Permalink
Match the controller and path names defensively.
Browse files Browse the repository at this point in the history
Use '\A' instead of '^', and make the alteration shorter.
  • Loading branch information
BanzaiMan committed Dec 11, 2012
1 parent 603e7f7 commit c00e7aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/routing/inspector.rb
Expand Up @@ -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?
Expand Down

1 comment on commit c00e7aa

@tenderlove
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.