エラー文でググっても出てこなかったけどよく見たら一瞬で解決した話
matchText = text.match(/hoge/)
Text.find_by(value: matchText)
こんな感じで怒られたけどmatchで帰ってくるのはMatchDataっていうオブジェクトなので
matchText = text.match(/hoge/).to_s
Text.find_by(value: matchText)
こうしてto_sでstring化したら解決
More than 5 years have passed since last update.
エラー文でググっても出てこなかったけどよく見たら一瞬で解決した話
matchText = text.match(/hoge/)
Text.find_by(value: matchText)
こんな感じで怒られたけどmatchで帰ってくるのはMatchDataっていうオブジェクトなので
matchText = text.match(/hoge/).to_s
Text.find_by(value: matchText)
こうしてto_sでstring化したら解決
Register as a new user and use Qiita more conveniently