From: Brian Candler Date: 2010-01-08T06:18:49+09:00 Subject: Re: How to use the same params in respond_to for some formats ? Camille Roux wrote: > I want to make an API in XML and JSON (maybe more), and I want most of > the time use the same parameters for the to_xml and the to_json (same > :include, :only, :except, :methods). > In your opinion, what is the best way to do that? respond_to is not a ruby method. My guess is that you are writing an application in Rails. Rails has its own forums and you would do best to ask there; this forums is for the Ruby programming language. -- Posted via http://www.ruby-forum.com/.