• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Voice data server for navigation voice changer app.


コミットメタ情報

リビジョンc79cf294f8bb99a47720fc7a67f7c0ee7488facb (tree)
日時2013-12-01 21:00:18
作者HMML <hmml3939@gmai...>
コミッターHMML

ログメッセージ

Fix error render for unknown format.

変更サマリ

差分

--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -61,6 +61,11 @@ class ApplicationController < ActionController::Base
6161 opt.delete :template
6262 render :json => opt, :status => opt[:status]
6363 }
64+ format.any {
65+ opt[:template] += ".html"
66+ opt[:content_type] = 'text/html'
67+ render opt
68+ }
6469 end
6570 end
6671
@@ -73,4 +78,5 @@ class ApplicationController < ActionController::Base
7378 logger.error "RecordNotFound [#{request.path}]: (404) #{e.message}"
7479 render_error :message => e.message, :status => 404
7580 end
81+
7682 end