class Remotty::Rails::Authentication::JsonAuthFailure
return json Device error occur
Public Instance Methods
http_auth_body()
click to toggle source
# File lib/remotty/rails/authentication/json_auth_failure.rb, line 5 def http_auth_body return i18n_message unless request_format method = "to_#{request_format}" if method == "to_xml" { error: { code: "UNAUTHORIZED", message: i18n_message } }.to_xml(:root => "errors") elsif {}.respond_to?(method) { error: { code: "UNAUTHORIZED", message: i18n_message } }.send(method) else i18n_message end end
respond()
click to toggle source
# File lib/remotty/rails/authentication/json_auth_failure.rb, line 28 def respond http_auth end