Merge branch 'dev_aliyun' into dev_hs

dev_hs
SylorHuang 5 years ago
commit 50597d7fd6

@ -0,0 +1,42 @@
class ModifyCourseIntroductionForBoards < ActiveRecord::Migration[5.2]
def change
platform = PlatformSample.where(:samples_type => "courseGuide").first
content = '
线
线
- Python[Python](https://www.educoder.net/paths/13) | [Python](https://www.educoder.net/paths/11)
- Java[Java](https://www.educoder.net/paths/38)
- C/C++[C/C++](https://www.educoder.net/paths/3) | [C](https://www.educoder.net/paths/4)
- Matlab[MATLAB](https://www.educoder.net/shixuns/7bvs54gw/challenges) | [](https://www.educoder.net/shixuns/q4fowkfa/challenges) | [](https://www.educoder.net/shixuns/grunzcs3/challenges)
- HTML/CSS[HTML5+CSS3](https://www.educoder.net/paths/15)
- [Docker](https://www.educoder.net/paths/29)
... ...
'
platform.update_column(:contents, content)
messages = Message.where(subject: "新课导语")
messages.find_each do |m|
m.update_column(:is_md, true)
message_detail = m.message_detail
message_detail.update_column(:content, content) if message_detail
end
end
end
Loading…
Cancel
Save