From cc8acdcc87dbbf44519ab1c1baf31161d0640efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 19 May 2024 04:49:10 +0200 Subject: [PATCH] Make method name consistent in embedded video component We were using `reg_exp` as the method name, when it returned `VIMEO_REGEX` or `YOUTUBE_REGEX`. So using `regex` as the method name is less confusing. --- app/components/shared/embedded_video_component.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/shared/embedded_video_component.rb b/app/components/shared/embedded_video_component.rb index 52054d4a0..117d230f6 100644 --- a/app/components/shared/embedded_video_component.rb +++ b/app/components/shared/embedded_video_component.rb @@ -33,7 +33,7 @@ class Shared::EmbeddedVideoComponent < ApplicationComponent end end - def reg_exp + def regex if server == "Vimeo" record.class::VIMEO_REGEX elsif server == "YouTube" @@ -50,7 +50,7 @@ class Shared::EmbeddedVideoComponent < ApplicationComponent end def match - @match ||= link.match(reg_exp) if reg_exp + @match ||= link.match(regex) if regex end def iframe_attributes