摘要: 1、ApplicationRecord在Rails4中所有的模型都继承自ActiveRecord::Base,不过在Rails5中新引进了一个叫ApplicationRecord的类,存放在: app/models/application_record.rb中,所有Rails5应用都会有这个类, 它 阅读全文
posted @ 2017-02-07 11:37 吕兴杰 阅读(1831) 评论(1) 推荐(0)
摘要: rails2之前创建新项目: rails3以及更高版本创建新项目:rails new webname 创建数据表model:rails g model user name:string sex:string 创建controller:rails g controller user index new 阅读全文
posted @ 2017-01-20 11:27 吕兴杰 阅读(386) 评论(0) 推荐(0)
摘要: 克隆远程服务器项目到本地:git clone git@gitcode.aggso.com:patgate/web.git 查看分支:git branch创建分支:git branch <name>切换分支:git checkout <name>创建+切换分支:git checkout -b <nam 阅读全文
posted @ 2017-01-20 11:14 吕兴杰 阅读(109) 评论(0) 推荐(0)