Lydia's blog

Every day to be a little better


  • Home

  • Archives

  • Search

rails--路由

Posted on 2017-02-19 22:56

1.restful
get 查询
post 新建
put 修改
delete 删除

2.root path
root to: ‘xxx/xxx’(文件路径)

3.match路径
match ‘xxx/xxx’(http路径名), to: ‘xxx#xxx’(文件路径), via: ‘get’

4.接口
render json: {
key: value,
……
}

5.查看
bunle exec rake routes
过滤想要的
undle exec rake routes | grep “xxx”

# ruby
sass与css
controller&model文件头尾固定代码&migration文件代码样式

Lydia

This is lydia's blog

277 posts
1 categories
46 tags
© 2020 Lydia
Powered by Hexo
|
Theme — NexT.Muse v5.1.4