Rest rails
来源:互联网 发布:java程序员需要看的书 编辑:程序博客网 时间:2024/05/22 02:05
resources :posts
posts_path index get
post_path(@post) show get
new_post_path new get
posts_path(@post) create post eg: form_for (@post, :url=>posts_path(@post))
edit_post_path edit get
post_path(@post) update put
post_path(@post) destroy delete eg: link_to 'remove', post_path(@post),:method=>'delete'
Nest resources : events, :comment
map.resoureces : events do | event |
event.resoureces :comments
end
event_comments_path(@event) index get
event_comment_path(@event,@comment) show get
new_event_comment_path new get
event_comments_path(@post,@comment) create post
edit_event_comment(@event,@comment) edit get
event_comment_path(@event,@comment) update put
event_comment_path(@event,@comment) destroy delete
- Rest rails
- REST in Rails
- REST on Rails指南
- 跨越边界: REST on Rails
- 使用curl测试rails rest
- Rails中的REST路由规则
- 跨越边界: REST on Rails
- REST on Rails指南1:理解资源
- REST on Rails指南3: RESTful Design
- REST on Rails指南4:路由
- REST on Rails指南5: respond_to
- Practical REST on Rails 2 Projects
- REST on Rails指南1:理解资源
- REST on Rails指南2:无穷尽的API
- rails 的 REST 结构和 route 代码分析
- Rails 3入门之二 2- 3 REST
- rails db:migrate:reset 或者 rails db:rest失败 (rails 5)报错(Permission denied、Couldn't drop database)
- rest
- Ehgrid使用方法
- SOA解决的问题----记录今天在客户那边讲解SOA
- ahaha
- 代码复用的规则
- 在CentOS 5下安装MPlayer-1.0rc1手记
- Rest rails
- 数据库Standby中的几个概念 - LGWR, ARCH,ASYNC,SYNC,AFFIRM
- store session via DB in rails
- 如何有效阅读他人代码(一)
- 很经典的 不用第三个变量把这两个变量值
- 实现atoi,itoa,strcmp,strcpy,strcat,strlen函数
- 如何阅读他人代码(二)
- 有关封装和信息隐藏的误区 收藏 此文于2010-08-31被推荐到CSDN首页 如何被推荐?
- C#中使用Property Grid(属性面板)控件