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
|
||||||
end
|
end
|
||||||
|
|
||||||
def reg_exp
|
def regex
|
||||||
if server == "Vimeo"
|
if server == "Vimeo"
|
||||||
record.class::VIMEO_REGEX
|
record.class::VIMEO_REGEX
|
||||||
elsif server == "YouTube"
|
elsif server == "YouTube"
|
||||||
@@ -50,7 +50,7 @@ class Shared::EmbeddedVideoComponent < ApplicationComponent
|
|||||||
end
|
end
|
||||||
|
|
||||||
def match
|
def match
|
||||||
@match ||= link.match(reg_exp) if reg_exp
|
@match ||= link.match(regex) if regex
|
||||||
end
|
end
|
||||||
|
|
||||||
def iframe_attributes
|
def iframe_attributes
|
||||||
|
|||||||
Reference in New Issue
Block a user