オMIMEタイプにレール
-
01-07-2019 - |
質問
したいオーバーライドJSONのMIMEタイプ("application/json"のレール("text/x-json").また登録にMIMEタイプを再びmime_types.rbがなかった。ご意見募集
感謝。
解決
この作品に初期化子、プラグイン、または同様の場所):
Mime.send(:remove_const, :JSON)
Mime::Type.register "text/x-json", :json
他のヒント
う:
render :json => var_containing_my_json, :content_type => 'text/x-json'
所属していません StackOverflow