sql - 如何在 Rails 控制台中的某个值之间添加值
问题描述
我的数据库中有以下记录
[662] #<ChapterSolution:0x000055ec31cdfb40> {
:id => 5071,
:chapter_id => 221,
:created_at => Tue, 19 Sep 2017 18:24:57 IST +05:30,
:updated_at => Sat, 02 Dec 2017 10:24:53 IST +05:30,
:question => "11",
:part => "i",
:answer => "See Explanation",
:solution => "<img src='//cdn.google.in/editor/pictures/573/content.jpeg' />"
[663] #<ChapterSolution:0x000055ec31cdfb40> {
:id => 5071,
:chapter_id => 221,
:created_at => Tue, 19 Sep 2017 18:24:57 IST +05:30,
:updated_at => Sat, 02 Dec 2017 10:24:53 IST +05:30,
:question => "11",
:part => "i",
:answer => "See Explanation",
:solution => "<img src='//cdn.google.in/editor/pictures/574/content.jpeg' />"
[664] #<ChapterSolution:0x000055ec31cdfb40> {
:id => 5071,
:chapter_id => 221,
:created_at => Tue, 19 Sep 2017 18:24:57 IST +05:30,
:updated_at => Sat, 02 Dec 2017 10:24:53 IST +05:30,
:question => "11",
:part => "i",
:answer => "See Explanation",
:solution => "<img src='//cdn.google.in/editor/pictures/575/content.jpeg' />"
我想在每条记录的解决方案值中添加https:在img src='和//cdn.google...之间,以使每条记录中的 URL 正确,
但是我不知道该怎么做,任何帮助/建议将不胜感激。
解决方案
推荐阅读
- azure-active-directory - Azure Active Directory 中为我的 Web API 配置的令牌生命周期
- xslt - 如何使用 2.0 版计算 XSLT 中数字的绝对值
- python - 如何解决 pandas 的内存分配问题?
- php - 无法在实时服务器上找到我的 php ini 文件?
- javascript - jQuery基于父URL添加类
- android - 在哪里集成 getStream.io
- c - 如何将数组传递给无法修改它的函数?
- angular - 错误:supportsScrollBehavior 未声明为可配置
- oracle - 如何使用表中的多个参数值调用 Oracle 存储过程
- java - 如何将 switch-case 替换为 OOP