2011-07-08 129 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

相關問題