Voice data server for navigation voice changer app.
Revisión | c79cf294f8bb99a47720fc7a67f7c0ee7488facb (tree) |
---|---|
Tiempo | 2013-12-01 21:00:18 |
Autor | HMML <hmml3939@gmai...> |
Commiter | HMML |
Fix error render for unknown format.
@@ -61,6 +61,11 @@ class ApplicationController < ActionController::Base | ||
61 | 61 | opt.delete :template |
62 | 62 | render :json => opt, :status => opt[:status] |
63 | 63 | } |
64 | + format.any { | |
65 | + opt[:template] += ".html" | |
66 | + opt[:content_type] = 'text/html' | |
67 | + render opt | |
68 | + } | |
64 | 69 | end |
65 | 70 | end |
66 | 71 |
@@ -73,4 +78,5 @@ class ApplicationController < ActionController::Base | ||
73 | 78 | logger.error "RecordNotFound [#{request.path}]: (404) #{e.message}" |
74 | 79 | render_error :message => e.message, :status => 404 |
75 | 80 | end |
81 | + | |
76 | 82 | end |