-
-
Save paul/981186 to your computer and use it in GitHub Desktop.
Using AD's ParamsParser middleware
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'yajl' | |
module Ssaj | |
PARSER = Proc.new do |data| | |
HashWithIndifferentAccess.new(Yajl::Parser.parse(data)) | |
end | |
ActionDispatch::ParamsParser::DEFAULT_PARSERS[Mime::SSAJ1] = PARSER | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment