respond_with in Rails 3
?
在Rails3的controller中,很明显的一个变化就是respond_to不见了,取而代之的是respond_with这个方法,那么这个新的方法有什么好处呢?下面是我的一次小小的初探经历。
??生成代码之后启动服务器,访问对应的url,我得到了一个这样的错误。
?
# in create or updaterespond_with(@post, :location => admin_post_url(@post))
??呵呵,代码还是那么简单。