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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user