diff options
author | Xavier Noria <fxn@hashref.com> | 2015-06-20 23:08:51 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2015-06-20 23:08:51 +0200 |
commit | d8c22275faa738f1f0e6ff004bcc81488eab87c9 (patch) | |
tree | 451347a566d914e2a35085751a6d57b7fa194887 /actionview/lib/action_view | |
parent | 34012244b40155e0efd2ce57cfede8146a31f844 (diff) | |
download | rails-d8c22275faa738f1f0e6ff004bcc81488eab87c9.tar.gz rails-d8c22275faa738f1f0e6ff004bcc81488eab87c9.tar.bz2 rails-d8c22275faa738f1f0e6ff004bcc81488eab87c9.zip |
removes unnecessary backslashes in regexps
Colons are not metacharacters.
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/template/resolver.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb index 955118a554..916d30e751 100644 --- a/actionview/lib/action_view/template/resolver.rb +++ b/actionview/lib/action_view/template/resolver.rb @@ -209,13 +209,13 @@ module ActionView query = @pattern.dup prefix = path.prefix.empty? ? "" : "#{escape_entry(path.prefix)}\\1" - query.gsub!(/\:prefix(\/)?/, prefix) + query.gsub!(/:prefix(\/)?/, prefix) partial = escape_entry(path.partial? ? "_#{path.name}" : path.name) - query.gsub!(/\:action/, partial) + query.gsub!(/:action/, partial) details.each do |ext, variants| - query.gsub!(/\:#{ext}/, "{#{variants.compact.uniq.join(',')}}") + query.gsub!(/:#{ext}/, "{#{variants.compact.uniq.join(',')}}") end File.expand_path(query, @path) |