Skip to content

Instantly share code, notes, and snippets.

@Sutto
Created December 22, 2013 15:20
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