1
0
Fork 0
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:
Rafael Mendonça França 2014-06-19 13:29:14 -03:00
commit b43584113c

View file

@ -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