1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix Rubocop violation

This commit is contained in:
Rafael Mendonça França 2019-12-09 12:14:24 -03:00
parent e67fdc5aeb
commit 737fb59eb3
No known key found for this signature in database
GPG key ID: FC23B6D0F1EEE948

View file

@ -355,7 +355,7 @@ module ActionDispatch
def add_controller_module(controller, modyoule) def add_controller_module(controller, modyoule)
if modyoule && !controller.is_a?(Regexp) if modyoule && !controller.is_a?(Regexp)
if %r{\A/}.match?(controller) if controller.to_s.start_with?("/")
controller[1..-1] controller[1..-1]
else else
[modyoule, controller].compact.join("/") [modyoule, controller].compact.join("/")