diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-19 13:29:14 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-19 13:29:14 -0300 |
commit | b43584113c4862f7444b06404f16255a9bf42c48 (patch) | |
tree | fa236e0686d5ff60502b4ba530e5d6c68be307c6 | |
parent | 6a682e3f8b03405669c8f56578eeafca2201056b (diff) | |
parent | 453cd7b6176dd9cb2acc2a597b096ddadf6790a5 (diff) | |
download | rails-b43584113c4862f7444b06404f16255a9bf42c48.tar.gz rails-b43584113c4862f7444b06404f16255a9bf42c48.tar.bz2 rails-b43584113c4862f7444b06404f16255a9bf42c48.zip |
Merge pull request #15813 from DNNX/valid-action-name-refactoring
Relpace `=~ Regexp.new str` with `.include? str` in `_valid_action_name?`
-rw-r--r-- | actionpack/lib/abstract_controller/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/abstract_controller/base.rb b/actionpack/lib/abstract_controller/base.rb index acdfb33efa..15faabf977 100644 --- a/actionpack/lib/abstract_controller/base.rb +++ b/actionpack/lib/abstract_controller/base.rb @@ -255,7 +255,7 @@ module AbstractController # Checks if the action name is valid and returns false otherwise. def _valid_action_name?(action_name) - action_name !~ Regexp.new(File::SEPARATOR) + !action_name.to_s.include? File::SEPARATOR end end end |