Skip to content

Instantly share code, notes, and snippets.

@vijaydev
Created June 4, 2011 14:35
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save vijaydev/1007943 to your computer and use it in GitHub Desktop.
# Respond to also allows you to specify a common block for different formats by using any:
#
# def index
# @people = Person.all
#
# respond_to do |format|
# format.html
# format.any(:xml, :json) { render request.format.to_sym => @people }
# end
# end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment