Embracing REST with mind, body and soul « Plataformatec Blog - 0 views
-
gain with respond_with introduction is more obvious if you compare index, new and show actions
-
張 旭 on 30 Dec 14看起來 respond_with 會根據 request 型態自動回覆對應型態的 response
-
-
you can define supported formats at the class level and tell in the instance the resource to be represented by those formats.
-
when a request comes, for example with format xml, it will first search for a template at users/index.xml. If the template is not available, it tries to render the resource given (in this case, @users) by calling :to_xml on it
- ...6 more annotations...