Skip to content

Instantly share code, notes, and snippets.

@Sutto
Created December 22, 2013 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sutto/8084038 to your computer and use it in GitHub Desktop.
Save Sutto/8084038 to your computer and use it in GitHub Desktop.
class ApiController < RocketPants::Base
# Override the json encoding mechanism to use Oj for mega-speed!
def encode_to_json(json)
Oj.dump json, mode: :compat
end
add_method_tracer :encode_to_json
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment