2011-07-08 128 views

回答

12

有一个相当完整的答案here。本质上,respond_with与respond_to做同样的事情,但会让你的代码更清洁一些。它仅在rails 3中可用我认为

+0

这基本上就是这样,respond_with只是清理一切,并自动化了很多。此链接进一步详细:http://ryandaigle.com/articles/2009/8/6/what-s-new-in-edge-rails-cleaner-restful-controllers-w-respond_with – SaucyK

相关问题