From c5297eda0549584ad1c145354f5d5be0486ecd67 Mon Sep 17 00:00:00 2001 From: mike vallano Date: Tue, 24 Nov 2020 15:05:43 -0600 Subject: [PATCH] 225: Use URI and CGI instead of addressable to parse trailer url --- app/controllers/movies_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/movies_controller.rb b/app/controllers/movies_controller.rb index 46f9ffaf..0b8ff6c1 100644 --- a/app/controllers/movies_controller.rb +++ b/app/controllers/movies_controller.rb @@ -88,7 +88,7 @@ def required_params end def youtube_id - uri = Addressable::URI.parse(params[:trailer]) - uri.query_values['v'] if uri.query_values + uri = URI.parse(params[:trailer]) + CGI::parse(uri.query)['v']&.first if uri.query end end