Skip to content

Instantly share code, notes, and snippets.

@gieart87
Created August 9, 2016 02:47
Show Gist options
  • Save gieart87/69c781700267fa314bfcb4259d6e5869 to your computer and use it in GitHub Desktop.
Save gieart87/69c781700267fa314bfcb4259d6e5869 to your computer and use it in GitHub Desktop.
Rails : Override Mime Type and Respond Default Format in Controller
# force as xml when params[:format] isn't present
request.format = 'xml'.to_sym if params[:format].nil?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment