mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #15813 from DNNX/valid-action-name-refactoring
Relpace `=~ Regexp.new str` with `.include? str` in `_valid_action_name?`
This commit is contained in:
commit
b43584113c
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue