mirror of
https://github.com/discourse/discourse-chat-integration.git
synced 2025-07-01 20:02:10 +00:00
Replace match?
with match
for backwards compatibility with Ruby 2.3
This commit is contained in:
parent
ce8acc9c26
commit
61fa0dbe0b
@ -41,7 +41,7 @@ class DiscourseChat::Channel < DiscourseChat::PluginModel
|
|||||||
|
|
||||||
data.each do |key, value|
|
data.each do |key, value|
|
||||||
regex_string = params.find{|p| p[:key] == key}[:regex]
|
regex_string = params.find{|p| p[:key] == key}[:regex]
|
||||||
if !Regexp.new(regex_string).match?(value)
|
if !Regexp.new(regex_string).match(value)
|
||||||
errors.add(:data, "data.#{key} is invalid")
|
errors.add(:data, "data.#{key} is invalid")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user