惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
Cloudbric
Cloudbric
V
Visual Studio Blog
L
LangChain Blog
A
About on SuperTechFans
B
Blog
T
Tenable Blog
罗磊的独立博客
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
博客园 - 三生石上(FineUI控件)
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Palo Alto Networks Blog
U
Unit 42
WordPress大学
WordPress大学
D
Darknet – Hacking Tools, Hacker News & Cyber Security
N
News and Events Feed by Topic
T
Threat Research - Cisco Blogs
C
Check Point Blog
Security Latest
Security Latest
M
MIT News - Artificial intelligence
Application and Cybersecurity Blog
Application and Cybersecurity Blog
宝玉的分享
宝玉的分享
P
Proofpoint News Feed
NISL@THU
NISL@THU
Forbes - Security
Forbes - Security
S
Securelist
Security Archives - TechRepublic
Security Archives - TechRepublic
Hugging Face - Blog
Hugging Face - Blog
aimingoo的专栏
aimingoo的专栏
Latest news
Latest news
GbyAI
GbyAI
T
Troy Hunt's Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
L
LINUX DO - 热门话题
V2EX - 技术
V2EX - 技术
小众软件
小众软件
Google DeepMind News
Google DeepMind News
K
Kaspersky official blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
N
Netflix TechBlog - Medium
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Google DeepMind News
Google DeepMind News
P
Proofpoint News Feed

博客园 - 上官帅帅

vue3 - 01 路由的配置和使用 vue 环境配置 vue html DOM树对象 idea maven pom配置文件 .net core dapper (5) .net core dapper (4) .net core dapper (3) .net core dapper (2) .net core dapper (1) c# 异步 async await jq_js window 使用vagrant搭建开发开发环境 判断元素的属性是否存在 js 查找树节点 数组去重 redis 基础知识 jQuey知识点三 解析json数据 mysql 基础操作一 ruby 基础知识三 读写文件
Active Record 数据迁移
上官帅帅 · 2016-02-14 · via 博客园 - 上官帅帅

1.创建controler: welcome ;action: index

$ rails generate controller welcome index

2.创建名为Article的model定义title:string text:text
$ bin/rails generate model Article title:string text:text 
$ bin/rake db:migrate 迁移数据

3.创建model 添加关联
$ rails generate model Comment commenter:string body:text article:references

4.在文件中 config/routes.rb 添加一个rest 动作
Rails.application.routes.draw do
resources :articles
end

$ bin/rake routes

5.进入控制台
rails c